Results 1 to 4 of 4
  1. #1
    mushy is offline Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default Noob problems with netbeans

    Hey, ive recently decided to learn java. I downloaded the netbeans ide and have two small problems.

    I have created a simple GUI, in the main file wiki.java. I then added a new class to the same project called fileoptions.java.

    If i go to the wiki.java right click and run file it displays the GUI no problem. However it ignores the fileoptions class.

    So i went to the project, right clicked and pressed run. Everything builds fine, but no gui is displayed.

    So i click on the project and build, it builds ok and but no gui appears, it tells me i can run it from command line using java -jar c:\ etc..

    so i copy and paste that into a command prompt and it runs ok, but still no gui appears.

    so then i locate the jar file and double click, however no gui appears.

    Im not sure how to make the gui work outside of runing one file on netbeans.

  2. #2
    Manofest's Avatar
    Manofest is offline Member
    Join Date
    Dec 2008
    Posts
    10
    Rep Power
    0

    Default

    Can you post some code like where about's the fileoptions is referenced in your main wiki file.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Basically how your classes are interact. I think there is no connection at all. You said that separately you can run and see that UI. But from one class call fileoption class you cannot see that. Either you have to instantiate that UI class in the main method of the fileoption class or something else.

    It's better if you can show your code to see. Without looking that it's difficult yo answer your question.

  4. #4
    sari's Avatar
    sari is offline Member
    Join Date
    Jan 2009
    Posts
    32
    Rep Power
    0

    Default

    Try using the setVisible(true) method I forget to do that sometimes and exactly the same thing happens
    If you don't try you can't succeed.

Similar Threads

  1. problems with connecting to Oracle DB in NetBeans
    By m16k2002 in forum Web Frameworks
    Replies: 6
    Last Post: 03-25-2009, 10:14 AM
  2. problems with class Splashscreen in netbeans
    By ernieBob in forum NetBeans
    Replies: 0
    Last Post: 02-07-2008, 01:30 AM
  3. Problems with NetBeans
    By gabriel in forum NetBeans
    Replies: 2
    Last Post: 11-07-2007, 09:49 PM
  4. Replies: 0
    Last Post: 08-07-2007, 07:01 AM
  5. Problems to install NetBeans
    By fred in forum NetBeans
    Replies: 1
    Last Post: 08-02-2007, 05:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •