Solved

trying to access 2 classes with the one JButton

Posted on 2004-04-30
9
191 Views
Last Modified: 2010-03-31
I'm creating GUI's using java and trying to call 2 separate classes using the one JButton, but the last class i instantiate in the JButton code is the only one the runs,

Is there any way to run the 2 classes with the one JButton Action..
0
Comment
Question by:cutjack
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 
LVL 4

Expert Comment

by:91mustang
ID: 10961042
post the problem code please
0
 

Author Comment

by:cutjack
ID: 10961092
private void conButActionPerformed(java.awt.event.ActionEvent evt) {
        Connect con = new Connect();
        monitor m = new monitor();                
        m.monFolder();
        con.Responder();      
       
    }
0
 
LVL 13

Assisted Solution

by:copyPasteGhost
copyPasteGhost earned 150 total points
ID: 10961231
that code should work
are you sure monFolder() is not being executed?
are there any errors you are receiving?
Ghost
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:91mustang
ID: 10961242
Really should not be a problem with that code...
0
 
LVL 4

Expert Comment

by:91mustang
ID: 10961257
What is monFolder()  trying to do?
0
 
LVL 4

Accepted Solution

by:
91mustang earned 150 total points
ID: 10961267
Wild geuss but maybe exception thrown, with no handling???
0
 

Author Comment

by:cutjack
ID: 10961271
monFolder monitors incoming messages to an Inbox
0
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 10961286
add a print line to that method and see what happens (monFolder)
Ghost
0
 
LVL 4

Expert Comment

by:91mustang
ID: 10961296
make sure the line is the first line of the method
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question