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
Solved

trying to access 2 classes with the one JButton

Posted on 2004-04-30
9
188 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

829 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