|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Linking the gui???
i m totally new in java
now i using netbean to make the gui is very easy jus drag n drop... but i don know how to link to anyther interface example i clicking on button register then anythor interface came out..... how can i make the button register in that gui working to llink with another???? thanks for the help......... |
|
#2
|
|||
|
|||
|
If you need for it to popup a Dialog (or a new frame), you write the following in the class with the button:
public Example exampleDialog; //Example is the name of the new class, where the dialog configuration would be placed exampleDialog = new Example(); //Creating a new Dialog private class Controller implements ActionListener { public void actionPerformed(ActionEvent e) { if (e.getSource() == yourbutton ){ exampleDialog.setVisible(true); } //When the button is clicked, it will open a new Dialog. //In the Example we class, you just create a new frame, with necessary options. public class Example extends JDialog { public ConferenceDialog(){ this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CL OSE); this.setModal(true); this.setTitle("title"); this.setLocation(150, 150); this.setSize(465, 405); this.setResizable(false); //..and so on So when you click on the button, it will open a new Dialog frame. Hope it helps. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Linking the gui??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|