LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 30
swing JFrame listener questions


Hi,
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?
Thanks

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

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


Reply


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 11:32 AM.

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