just have a panel code, how to run the panel code in net beans...
i have a jpanel and want to run the panel in the java netbeans, how should i implement it. I am a starter so please help me getting this.
Not sure about the NetBeans part, but you need an application class (with a "main" method) to run code. That class would need to create a Swing object that can be displeyed -possibly a JFrame-, and to which you can add the JPanel.
Please UseCodeTags when posting code. I have added them for you this time.
Like Ulf has already pointed out, you need to write a program with main method and building a JFrame.
The tutorial has a page about writing a small Swing application.
And in NetBeans, you can run any file that has a main method - just right click on the file and select Run File.
Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Don't get me started about those stupid light bulbs.