aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes No answer comes out in the result field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "No answer comes out in the result field" Watch "No answer comes out in the result field" New topic
Author

No answer comes out in the result field

Abeer El-shaer
Greenhorn

Joined: Nov 01, 2012
Posts: 29


--------------------Configuration: <Default>--------------------
Note: C:\cccc.
Note: Recompile with -Xlint:deprecation for details.

Process completed.
plus no answer comes out on the Result text
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
That code is too long for us to read, but I could see a problem even in the first second while scrolling down.
public class cccc extends JFrame implements ActionListener
Apart from the really poor name for the class (and you have some other poor names), that line hides a design error. Don’t make your components implement Listeners like that. You should add individual Listener objects to each control. How are you adding the listener to the button?
The reason you are getting the Xlint warning is probably because you are using deprecated code. Follow the instructions exactly to see what is happening. I am surprised that you know how to write your own layouts, but don’t know which methods are deprecated. Nor have you put anything in to terminate the thread when you close the frame.
Where is the code which reads the contents of those text fields?
Go through your code, putting some print statements in your Listeners, so you can see when they are actually invoked.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Campbell Ritchie wrote:I am surprised that you know how to write your own layouts,

Not really.
http://editor-uml.googlecode.com/svn-history/r6/trunk/trunk/ProyectoFinalObjetos/src/main/java/edu/cmu/taghelpertools/gui/FeatureSelectionLayout.java and many other sources.

From that page:
Karim, in future please include the license and/or copyright notice for any code that isn't your own.


luck, db
There are no new questions, but there may be new answers.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
Moving to our GUIs forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No answer comes out in the result field