Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-18-2006, 10:09 AM   #1
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
swing JFrame listener questions

I have a "class A extends JFrame". On this class i have (created and)added class C and D objects - "class C extends JPanel" and "class D extends JPanel".
Which listener do i have to use in order to know if ANYTHING has changed either in objects A OR C and D?

Last edited by kpachopoulos; 03-18-2006 at 10:22 AM.
Old 03-19-2006, 04:32 PM   #2
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
the action listener attach to the object in focus for instance
in your jframe you make a jpanel
 JPanel B = new JPanel();
you put it in your jframe
then give it a listener like
B.addActionListener(new java.awt.event.ActionListener() {


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
java JFrame sizes. byteframe Programming 8 10-25-2005 02:09 AM
Resizing a JFrame when JPanel resizes? 95se Programming 1 03-23-2005 04:48 PM
questions on my java/swing gui xviddivxoggmp3 Programming 6 07-19-2004 10:44 AM
(jwstric2) JFrame error on JAVA nedian123 Programming 2 07-02-2004 05:10 AM
JAVA : cannot find class JFrame? OmniXBro Programming 11 06-04-2004 02:53 AM

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration