Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No answer comes out in the result field

 
Abeer El-shaer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


--------------------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
Pie
Posts: 49756
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49756
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUIs forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic