aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to add user input in a panel?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to add user input in a panel??" Watch "How to add user input in a panel??" New topic
Author

How to add user input in a panel??

Luong Vuong
Greenhorn

Joined: Jan 20, 2007
Posts: 8
hi i have created a panel:



Is there anyway of using the panel to accept user input, in this case the number of triangles.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Sure, of course! You can accept input in a TextField.

Moving to Swing/AWT/JFace/SWT.


[Jess in Action][AskingGoodQuestions]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
(looks like you may be using awt only).

a TextField is the normal way to handle user input, but you need to include
a fair amount of error handling. If the range of 'number of triangles' is limited,
it might be easier for you to use a java.awt.Choice, where the user can select
the number from a range you have set.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add user input in a panel??
 
Similar Threads
Getting wrong answers for conversion
User Input Parameters
Can varying input to a specified textField's ActionListener elicit corresponding varying output
So difficult to use Layout managers!!!
Help w/ Data Input Error