Results 1 to 5 of 5
  1. #1
    crunchymonkey is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default launching Jframe from text field

    Hey

    I want to click on a textfield (i.e two clicks) so that this then opens up a jframe which i then enter text in using buttons to then add this data to the system. How do i go about opening the panel from the text field as i have the panel with the text entry complete.

    thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Do you know about listeners?
    Do you know how to open a JFrame?
    Put the code to open the JFrame in the listener.

    Or please explain more or post your code with comments in it about what you want to do.

  3. #3
    crunchymonkey is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    not sure how to add the listener to the text field - i.e embed it

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Read the API doc for the textfield. It has add...Listener methods.
    Do a search for the methods you find for sample code.

    What does "embed it" mean?

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

    Default

    Also, are you sure that you really don't want to use a modal JDialog and not a JFrame?

Similar Threads

  1. need to add text field on existing dialog
    By SHAshank1 in forum SWT / JFace
    Replies: 0
    Last Post: 07-23-2008, 03:15 PM
  2. get numeric value from a text field
    By Lehane_9 in forum New To Java
    Replies: 2
    Last Post: 06-14-2008, 03:19 AM
  3. Regarding Text Field
    By adeeb in forum AWT / Swing
    Replies: 1
    Last Post: 06-05-2008, 11:01 PM
  4. Replies: 2
    Last Post: 04-28-2008, 10:26 AM
  5. Waste Space & Text Field
    By Gajesh Tripathi in forum AWT / Swing
    Replies: 2
    Last Post: 12-01-2007, 07:44 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
  •