Results 1 to 4 of 4

Thread: simple GUI

  1. #1
    dim_ath is offline Member
    Join Date
    Jan 2008
    Posts
    14
    Rep Power
    0

    Question simple GUI

    hello everyone!

    i d like to make a GUI consisting of a textField, a button
    and a textarea. what layout manager need i use? need i use a JPanel?
    my class extends JFrame
    Last edited by dim_ath; 01-07-2008 at 11:56 AM.

  2. #2
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default Gui

    Hello dim_ath.

    The simplest layout manager to use is FlowLayout. Also, it's up to you if you want to use a JPanel. In this simple GUI it might not be necessary, but then you must remember to assign the flow layout manager to the JFrame. ;)
    Do you want an example JFrame?
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

  3. #3
    meshal is offline Member
    Join Date
    Jan 2008
    Posts
    1
    Rep Power
    0

    Default

    i think u should use border layout
    put the text area in the center and JPanel either north or south which contains both the button & the text field

  4. #4
    dim_ath is offline Member
    Join Date
    Jan 2008
    Posts
    14
    Rep Power
    0

    Default

    yes!

    Basically i dlike the textField and the button to be to the north
    (without covering all the window) and the textArea to be to the
    south.

Similar Threads

  1. I need a simple programs
    By mikau in forum New To Java
    Replies: 2
    Last Post: 02-11-2008, 04:37 AM
  2. Simple java
    By abhiN in forum New To Java
    Replies: 1
    Last Post: 01-16-2008, 11:13 AM
  3. Probably a really simple question...
    By ibanez270dx in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 02:27 AM
  4. Seems so simple yet I can't figure it out!
    By adamhaviland in forum New To Java
    Replies: 1
    Last Post: 11-03-2007, 07:26 PM
  5. simple code
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:49 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
  •