• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error package does not exist

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i used Netbean 5.5 Beta 2 to create the JDialog...and i copy out the coding and execute in cmd.

why the parent set in the constructor is java.awt.Frame ?

and it also give me the error saying package org.jdesktop.layout does not exist...

how to solve it?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDialog has a Frame argument in the constructor because usually a dialog is launched from another 'application' frame. There are also other constructors, some that take Dialogs, some that take no parameters.

org.jdesktop.layout is a package that contains classes the GUI designer in Netbeans uses to layout components in your GUI - to have the produced GUI run on the command line, you'll need to find the JAR file containing the needed classes and include it in your classpath.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!