1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
JFrame Bn=new JFrame("NA");
Bn.setContentPane(new JPanelImageBg("Image/TB.gif"));
//Bn.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
//Bn.setIconImage(new ImageIcon("Image/icone.GIF" ).getImage());
Bn.setFont(new Font("Tahoma",Font.BOLD,12));
Bn.setVisible(true);
Bn.setSize(400,600);
Bn.setLocationRelativeTo(null);
Bn.setResizable(false);
JPanel BP=new JPanel();
BP.setBounds(10,20,70,100);
BP.setVisible(true);
BP.setBackground(Color.red);
JScrollPane SC = new JScrollPane();
SC.setViewportView(BP);
C=Bn.getContentPane();
C.setLayout(new FlowLayout());
C.add(BP);
C2=Bn.getContentPane();
C2.setLayout(new BorderLayout()); |
Partager