Solved

trying to access 2 classes with the one JButton

Posted on 2004-04-30
9
183 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
  • 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
 
LVL 4

Expert Comment

by:91mustang
ID: 10961242
Really should not be a problem with that code...
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now