Results 1 to 6 of 6
  1. #1
    ZaabZ is offline Member
    Join Date
    Aug 2010
    Location
    Denmark
    Posts
    8
    Rep Power
    0

    Default Initiating a JFrame form

    Hey again

    I figured that I could create some nice GUIs in Netbeans, as I thought that wasnt possible, like it is in VB.
    Anyway, I made a GUI, and want to initiate/call/start it. I've been looking around at some "call method" functions, but nothing worked.
    As a last resort I figured I would post here, again, as you solved my problem last time ;)

    I dont have the code for my GUI on this computer, though I can get it if you absolutely need it to solve this one.

    Calling form from main, as form is a file for itself.

    Best regards

    - ZaabZ

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by ZaabZ View Post
    Anyway, I made a GUI, and want to initiate/call/start it. I've been looking around at some "call method" functions, but nothing worked.
    Hello. Could you elaborate just a little on this? For instance, what do you mean by "call method functions"? And, what do you mean by "nothing worked"?

    I dont have the code for my GUI on this computer, though I can get it if you absolutely need it to solve this one.
    My experience here has been that we usually can provide more accurate help if we see the code associated with the problem itself.

    Calling form from main, as form is a file for itself.
    Again, I'm unclear, and sorry if it's my fault. Do you mean that you want to create another Java class, one with a main method, and from this main method display your GUI? If so, sometimes it's as simple as creating a new object of your GUI class and calling the setVisible(true) method on this new object. Again, we'll be able to tell you more if we can see the code.

    One last recommendation (for now): If you're serious about wanting to learn Java and Swing GUI coding, I strongly suggest that you avoid using NetBeans drag-and-drop code generation but rather go through the Sun/Oracle Swing tutorials and learn to code first by hand. The knowledge gained would be invaluable.

    Much luck!

  3. #3
    ZaabZ is offline Member
    Join Date
    Aug 2010
    Location
    Denmark
    Posts
    8
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    Hello. Could you elaborate just a little on this? For instance, what do you mean by "call method functions"? And, what do you mean by "nothing worked"?


    My experience here has been that we usually can provide more accurate help if we see the code associated with the problem itself.


    Again, I'm unclear, and sorry if it's my fault. Do you mean that you want to create another Java class, one with a main method, and from this main method display your GUI? If so, sometimes it's as simple as creating a new object of your GUI class and calling the setVisible(true) method on this new object. Again, we'll be able to tell you more if we can see the code.

    One last recommendation (for now): If you're serious about wanting to learn Java and Swing GUI coding, I strongly suggest that you avoid using NetBeans drag-and-drop code generation but rather go through the Sun/Oracle Swing tutorials and learn to code first by hand. The knowledge gained would be invaluable.

    Much luck!
    Hey
    Thanks alot for your answer;)
    I actually think that would be more handy over time, as I am planning on learning it. Thanks alot for the tip on Sun/Oracle Swing tuts, I will check them out right away. It wont be funny in the long run, just drag-n-drop, and dont understand the code itself.
    I will take a look at that, and if any issues come up, I will post here for some assistance ;)

    Problem disregarded for now.

    - ZaabZ

  4. #4
    ZaabZ is offline Member
    Join Date
    Aug 2010
    Location
    Denmark
    Posts
    8
    Rep Power
    0

    Default

    I found this one http://download.oracle.com/javase/tu...arn/index.html but it seems that it is WITH the drag-and-drop GUI editor. Do you think you could point me in the right direction regarding the tuts WITHOUT drag-and-drop GUI editor? :)

    - ZaabZ

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  6. #6
    ZaabZ is offline Member
    Join Date
    Aug 2010
    Location
    Denmark
    Posts
    8
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    This tutorial will help: Using Swing Components
    Thank you very much :)
    You can surely await my post for assistance on making it work proberly :D

    - ZaabZ

Similar Threads

  1. Replies: 6
    Last Post: 01-15-2012, 05:01 AM
  2. opening a Jframe form in a top of a new form
    By Nubkadiya in forum New To Java
    Replies: 7
    Last Post: 06-01-2010, 09:21 PM
  3. How To Open a JFrame Form from a jButton
    By Lyricid in forum AWT / Swing
    Replies: 12
    Last Post: 03-28-2010, 07:53 AM
  4. initiating objects question(kinda)
    By helpisontheway in forum New To Java
    Replies: 4
    Last Post: 01-11-2010, 04:07 AM
  5. Jtree link to JFrame Form
    By daniel50096230 in forum NetBeans
    Replies: 4
    Last Post: 09-16-2008, 07:53 AM

Posting Permissions

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