Results 1 to 2 of 2

Thread: GUI Questions

  1. #1
    AntivanCrow is offline Member
    Join Date
    Feb 2014
    Location
    MS
    Posts
    13
    Rep Power
    0

    Default GUI Questions

    I have some questions about a GUI program overlay. My main method in the "actual code" will display information in a huge batch, which is necessary. My questions relate to this feat. I am curious because I need to look this up but I am unsure of the "name" for what I am trying to accomplish.

    Can you link a JButton as an action item to display information to the JTextFeilds that houses the information needed to populate the data?

    If so, what are the necessary steps to ensure that my JButton class and listener are pulling the correct information upon the Event and populate the data to the JTextFeilds?

    Would I need a boolean statement that captures all of the methods of "data procurement" within my JTextFeilds underneath that one button?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: GUI Questions

    Quote Originally Posted by AntivanCrow View Post
    I have some questions about a GUI program overlay. My main method in the "actual code" will display information in a huge batch, which is necessary. My questions relate to this feat. I am curious because I need to look this up but I am unsure of the "name" for what I am trying to accomplish.
    I'm not sure what you mean by "actual code" or by "huge batch". Are you talking about a command line program that you're trying to convert to a GUI?

    Quote Originally Posted by AntivanCrow View Post
    Can you link a JButton as an action item to display information to the JTextFeilds that houses the information needed to populate the data?
    Are you asking if it's possible to display information in a JTextField when a JButton is pressed? If so, the answer is yes.

    Quote Originally Posted by AntivanCrow View Post
    If so, what are the necessary steps to ensure that my JButton class and listener are pulling the correct information upon the Event and populate the data to the JTextFeilds?
    Quote Originally Posted by AntivanCrow View Post
    Would I need a boolean statement that captures all of the methods of "data procurement" within my JTextFeilds underneath that one button?
    You need to add an ActionListener to your JButton, and give the ActionListener access to the JTextFields either through the constructor or through an inner class.

    More info here: Static Void Games Tutorials - ActionListeners
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Some questions
    By Lundager in forum New To Java
    Replies: 7
    Last Post: 05-19-2012, 06:48 PM
  2. questions
    By amaliutz in forum New To Java
    Replies: 13
    Last Post: 02-02-2011, 06:13 PM
  3. questions regarding XML
    By Sparky in forum New To Java
    Replies: 4
    Last Post: 02-01-2011, 07:10 PM
  4. Some Questions
    By MuslimCoder in forum New To Java
    Replies: 2
    Last Post: 02-25-2009, 04:01 PM
  5. Questions About JSP?
    By mtz1406 in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 08-19-2008, 07:56 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
  •