|
package jcredito;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Firstframe extends JFrame {
private Framereg frame;
public Firstframe() {
super("JCredito");
this. setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE);
use. setBackground(new Color(0, 64, 128 ));
use. setForeground(Color. ORANGE);
use. setFont(new Font("Arial", Font. BOLD, 16 ));
use.setActionCommand("a");
reg. setBackground(new Color(0, 64, 128 ));
reg. setForeground(Color. ORANGE);
reg. setFont(new Font("Arial", Font. BOLD, 16 ));
reg.setActionCommand("r");
p. setBackground(new Color(0, 60, 95 ));
p.add(use);
p.add(reg);
bg.add(use);//ascoltatori radiob
bg.add(reg);//
use.doClick();
JLabel l = new JLabel("Se non possiedi un accaunt registrati adesso.");
l. setFont(new Font("Arial", Font. BOLD, 14 ));
l. setForeground(Color. ORANGE);
pl.add(l);
pl. setBackground(new Color(0, 60, 95 ));
this.getContentPane().add(pl, "North");
this.getContentPane().add(p, "Center");
pb.add(click);
pb. setBackground(new Color(0, 60, 95 ));
this.getContentPane().add(pb, "South");
this.setResizable(false);
this.setVisible(true);
this.setBounds(340, 200, 400, 200);
this.pack();
click.addActionListener(
if ("a".equals(srb.getActionCommand())) {
setVisible(false);
frame = new Framereg(false);
} else if ("r".equals(srb.getActionCommand())) {
setVisible(false);
frame = new Framereg(true);
}
}
});
}
public static void main (String[] args ) {
Firstframe f = new Firstframe();
}
}
|
|