Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

extend JDialog - stupid question

843785Dec 7 2008 — edited Dec 8 2008
I'm trying to make my own custom JDialog so I did this:
public class myJDialog extends javax.swing.JDialog {

public myJDialog(javax.JFrame parentFrame){
     super(parentFrame);
    init();
}

public void init(){
/// add panel and components to this dialog...
}

}
then, in my main frame, I did this:
myJDialog dialog = new JDialog(this);


button_something when actionPerformed {

     dialog.setVisible(true);
}
new JDialog opens up but it's in native Java look and feel so I figured that I'm doing something wrong.
Couldn't find any tutorials on extending JDialog so I'm asking what am I doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 5 2009
Added on Dec 7 2008
23 comments
1,197 views