Skip to Main Content

Java Development Tools

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!

How to open a JPanel

461437Dec 13 2005 — edited Jan 19 2006
Hi

I have created a JPanel in JDeveloper 10.1.3. It has a main method with (see below) but when opened from my application I must use something else than JUTestFrame but what? How should the JPanel be opened the right way?

public static void main(String [] args) {
try {
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
} catch (ClassNotFoundException cnfe) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception exemp) {
exemp.printStackTrace();
}
} catch (Exception exemp) {
exemp.printStackTrace();
}
CurrencyRateEdit panel = new CurrencyRateEdit();
panel.setBindingContext(JUTestFrame.startTestFrame("mypackage.DataBindings.cpx", "null", panel, panel.getPanelBinding(), new Dimension(400,300)));
panel.revalidate();
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2006
Added on Dec 13 2005
11 comments
1,156 views