Re: How to create JDialog derived class using Apache Netbeans ID 13

2022-03-20 Thread antonio

Hi Zulfi,

You can take a look at the following tutorials:

https://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html
https://netbeans.apache.org/kb/docs/java/gui-functionality.html

Hope this helps,
Antonio

El 19/3/22 a las 0:30, Zulfi Khan escribió:
How to create SampleDialog class derived from JDialog implemnting 
ActionListener


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



How to create JDialog derived class using Apache Netbeans ID 13

2022-03-18 Thread Zulfi Khan
 
How to createSampleDialog class derived from JDialog implemnting ActionListener



 I want to create a JDialog derived class implementing ActionListener. The code 
is given below:

class SampleDialog extends JDialog implements ActionListener{
    JTextField tf1 = new JTextField(10);
    SampleDialog(JFrame parent, String title){
    super(parent, title, false);
    setLayout(new FlowLayout());
    setSize(300, 200);
    setTitle("OOP Project Spring, 2019, TTU");
    JButton addBtn = new JButton("Add"); 
    add(addBtn);
    add(tf1);
    addBtn.addActionListener(this);
    }
 public    void actionPerformed(ActionEvent evnt){
    String str = tf1.getText();
   JOptionPane.showMessageDialog(null, "Text Field Contained" + str);
    }
}

My application name is MenuDlg. I am cliclking on its icon but it shows me the 
option to create a Jframe class, Java class, java package, Java interface and 
so on but there is no option to create the JDialog derived class   implementing 
actionListener. Please guide me. I want to execute the SampleDialog using a 
menuitem.
Please guide me.
I can't take the screen shot when I am opening the Project->New->popup dialog 
box.
Zulfi.