Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How to make a JFrame "dumb"...
I am not really proficient in Java, so please excuse if this question is
trivial:

I got an application which consists of several JPanels next to each
other. One of the JPanels has (within its code) some actions defined for
mouse activity within that frame.

What I need: I want to use a "normal" mouse listener on top of that
special JPanel. BUT: the in-built functionalities override my mouse
listener.

So: is there a way to make the "active" panel go dumb (as in: not to
interfere with mouse action) WITHOUT editing this panel's source code?
Like putting an invisible layer on top or the like?

I do need the data this panel displays, but I must not edit the source
code...

Any ideas, hints? Thank you

Steffen

Report this thread to moderator Post Follow-up to this message
Old Post
Steffen Rueter
07-29-04 02:09 AM


Re: How to make a JFrame "dumb"...
"Steffen Rueter" <usenet@familie-rueter.de> wrote in message
news:ce83vq$4mm$1@post.student.mu-luebeck.de...
> I am not really proficient in Java, so please excuse if this question
is
>   trivial:
>
> I got an application which consists of several JPanels next to each
> other. One of the JPanels has (within its code) some actions defined
for
> mouse activity within that frame.
>
> What I need: I want to use a "normal" mouse listener on top of that
> special JPanel. BUT: the in-built functionalities override my mouse
> listener.
>
> So: is there a way to make the "active" panel go dumb (as in: not to
> interfere with mouse action) WITHOUT editing this panel's source code?
> Like putting an invisible layer on top or the like?
>
> I do need the data this panel displays, but I must not edit the source
> code...
>
> Any ideas, hints? Thank you
>
Can't you just extend the JPanel and override anything you don't want?



Report this thread to moderator Post Follow-up to this message
Old Post
jAnO!
07-29-04 02:09 AM


Re: How to make a JFrame "dumb"...
>>So: is there a way to make the "active" panel go dumb (as in: not to 
>
> Can't you just extend the JPanel and override anything you don't want?

Depends - that's the way I'd prefer not to go. The class in question has
about 25 methods calling several subclasses and so on, and I do NOT have
the time to follow each trail to see where it leeds and where any action
listeners are implemented... btw, I just looked at the source code and
commented out anything that had actionlistener in it, the display still
works fine, but still no mouse listener for me :-(

Thanks anyway

Steffen

Report this thread to moderator Post Follow-up to this message
Old Post
Steffen Rueter
07-29-04 02:09 AM


Re: How to make a JFrame "dumb"...
> So: is there a way to make the "active" panel go dumb (as in: not to
> interfere with mouse action) WITHOUT editing this panel's source code?
> Like putting an invisible layer on top or the like?

If your are using Swing, then the "glass pane"  may be useful :

http://java.sun.com/docs/books/tuto...s/rootpane.html

Bye.
--
Real Gagnon  from  Quebec, Canada
* Looking for Java or PB snippets ? Visit Real's How-to
* http://www.rgagnon.com/howto.html

Report this thread to moderator Post Follow-up to this message
Old Post
Real Gagnon
07-29-04 02:09 AM


Re: How to make a JFrame "dumb"...
Real Gagnon wrote: 
>
>
> If your are using Swing, then the "glass pane"  may be useful :
>
> http://java.sun.com/docs/books/tuto...s/rootpane.html

I've been experimenting with this, but so far without success. I do have
the impression that the "active" panel somehow steals all inputs,
although each and every line in there that refers to action listeners
and the like has been commented out...

Steffen

Report this thread to moderator Post Follow-up to this message
Old Post
Steffen Rueter
07-29-04 02:09 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:25 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.