• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error package does not exist

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic