• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Problem With RSA Interface

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Program complies and the interface shows up but there is no output after pressing run button. How come this is happening?

Thanks.

 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The actionPerformed method is never called, because it is not registered as an ActionListener; you need to have something like "nc5.setActionListener(nc5)" in your run method.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your NewClass5 doesnt implement ActionListener.
NewClass5 extends JFrame implements ActionListener

Also you havent registered the RunButton as the action source
RunButton.addActionListener(this);

This gives a null pointer exception, but then, at least its working! (You havent initialized the plainText array.)
 
Floetic Angel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you both for your suggestions. There is still no output coming to the output window of the interface.

 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After removing the "@Override" line that prevents compilation, the code compiles and runs fine. After clicking the run button something happens (it doesn't look like the correct thing, but at least output is displayed, so the button triggers an action).
 
Floetic Angel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I understand what you mean Im getting this on the general output of JCreator:

Plaintext:
Plaintext:
Plaintext:
Plaintext:
Plaintext:
Plaintext:
Plaintext:

Depending on how many times Ive clicked the Run button (which isnt correct, you are right about this) but for instance how would I manage to get that to show on the actual output window of the interface?
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Carla Pinate:
.. how would I manage to get that to show on the actual output window of the interface?



The JTextArea as methods for this.
Use InputStringTextField.setText(String text) or InputStringTextField.append(String text) as per your requirement.
 
What do you have to say for yourself? Hmmm? Anything? And you call yourself a tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic