This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

displaying a swing Transformeredit  RSS feed

 
terry oliver
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have a swing class named EngineeringData, and havemade another swing class TransformerEdit I would like to dispay the TransformerEdit when the edit button is pressed in engineering data I am having some problems can anyone help thanks

Olly
 
terry oliver
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is a part of my code whats wrong

private Vector secOhmsTemp;
private Vector secCmTemp;
TransformerEdit et;
//-----
// End of variables declaration


public engineeringDataSheet()
{
super();
initializeComponent();

TransformerEdit te = new TransformerEdit();
 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you doing about the edit button? Have you added a Listener to it? Do you know about Listeners?

Go through the Swing forum and look for threads like this, and this, where the conepts of Listeners have been discussed recently.
 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and why are you declaring a field inside the constructor? That is a sure-fire recipe for NullPointerExceptions later on.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the problem you are experiencing???
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!