Code :
public class HelloWorld extends JFrame { private static final long serialVersionUID = 1L; public static void main (String[] args ) { public void run() { HelloWorld f = new HelloWorld(); f.setVisible(true); } }); } public HelloWorld() { JPanel panel1 = makeTextPanel ("Panel #1" ); this.tabp.addTab("Tab 1", icon, panel1, "Does nothing" ); JPanel panel2 = makeTextPanel ("Panel #2" ); this.tabp.addTab("Tab 2", icon, panel2, "Does nothing" ); JPanel panel3 = makeTextPanel ("Panel #3" ); this.tabp.addTab("Tab 3", icon, panel3, "Does nothing" ); this.panel.add(this.tabp); getRootPane().requestFocus(); this.radioButton(this.panel); this.panel.add(this.txt); this. panel. add( new JButton("Go" )); this.scp.setBounds(100,100, 50 , 70); this.scp.setVisible(true); this.panel.add(this.scp); go.setToolTipText("Lancez la requête" ); } filler. setHorizontalAlignment(JLabel. CENTER); //panel.setLayout(new GridLayout(0, 1)); panel.add(filler); return panel; } }
|