Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / June 2004

Tip: Looking for answers? Try searching our database.

use my own panel in netbeans

Thread view: 
Pavel ?upa - 23 Jun 2004 11:49 GMT
Hello,
could anyone help me?
I created class extending JPanel - added some content ... now i'd like to
add it to my application window - by "clicking" in netbeans. But when i try
to add it to pallete with other components and it says "class cannot be
instantiated."
I tried to figure how to make a javabean out of it - then i hope it should
work - but from those java.sun.com tutorials i figured out only i should
implement Serializable and use standard methods like set...() and get...().
Both it uses.
Please help me, what to do to use a class extending JPanel in NetBeans form
editing GUI.

Lots of thanks.
Paja
Christophe Vanfleteren - 23 Jun 2004 23:19 GMT
Pavel ®upa wrote:

> Hello,
>  could anyone help me?
[quoted text clipped - 8 lines]
> Please help me, what to do to use a class extending JPanel in NetBeans
> form editing GUI.

You probably haven't added a default constructor. Add a constructor to the
JPanel that doesn't take any arguments.

If you do have a default constructor, make sure that no exeption gets thrown
while instantiating it.

Signature

Kind regards,
Christophe Vanfleteren



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.