Results 1 to 3 of 3
  1. #1
    mikau is offline Member
    Join Date
    Feb 2008
    Posts
    3
    Rep Power
    0

    Default I need a simple programs

    Hi everybody :) .

    My java knowledge is almost null. For now, I need to know how to create combobox, text fields and buttons. I've been reading some java tutos about this but the examples they show aren't that simple and is difficult for me to learn that way.

    I want simple examples, like one simple combobox with like 3 options, so I can learn where I change the combobox options names and the title of the combobox.

    First message :)
    Last edited by mikau; 02-11-2008 at 12:39 AM.

  2. #2
    Roughedge's Avatar
    Roughedge is offline Member
    Join Date
    Feb 2008
    Location
    Dundee
    Posts
    4
    Rep Power
    0

    Default

    Are you using an IDE to create your java code? When starting out with Java a few years ago, I found that the netbeans GUI editor was really easy to use and created pretty good code at a drag and drop style. You could use that then to re-create what you want and look at the code the IDE generates.

    Good tutorial - Lesson: Learning Swing with the NetBeans IDE (The Java™ Tutorials > Creating a GUI with JFC/Swing)

    If you want to manually code it all in, have a look at

    Java Swing Introduction to Swing Tutorial

    make sure you have the javadoc files though, best thing you can do when in doubt is look up the javadoc. Looking up that will tell you how to do
    Java Code:
    JComboBox myBox = new JComboBox(String ["Cow","Pig","Sheep","Deer"]);
    All you need to worry about after that is the positioning, which, in all honesty is the harder part to get your head round. Have a look at the tutorials, they will definitely help you out.

  3. #3
    mikau is offline Member
    Join Date
    Feb 2008
    Posts
    3
    Rep Power
    0

    Default

    thanks. Unfortunely, I'm using JCreator and that's all I can use for now.

    could somebody post the source code of a simple combobox (without images and stuff)?. I still haven't really got how the animals combobox on sun page works, so I wanna try a more simple combobox.

    Simple examples of text fields and buttons would be good to :)
    Last edited by mikau; 02-11-2008 at 04:48 AM.

Similar Threads

  1. simple GUI
    By dim_ath in forum New To Java
    Replies: 3
    Last Post: 01-07-2008, 04:00 PM
  2. Replies: 1
    Last Post: 01-05-2008, 08:48 PM
  3. simple code
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:49 PM
  4. Problem while executing programs
    By bks504 in forum New To Java
    Replies: 10
    Last Post: 08-02-2007, 02:32 PM
  5. how to take input and verify input in Java programs
    By bilal_ali_java in forum Advanced Java
    Replies: 0
    Last Post: 07-21-2007, 09:46 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
  •