Article View: borland.public.jbuilder.java.swing
Article #247Re: Missing events
From: Bruce Houghton
Date: Wed, 11 Apr 2007 21:08
Date: Wed, 11 Apr 2007 21:08
53 lines
2917 bytes
2917 bytes
Well, to put it as simply as I can, I created a
JList of names(as in address book). When I click on
a name in the JList, it won't always create an event
even though it does cause that name to be highlighted.
Now, to be more specific, I've build a POS system using
JList's and JTables's. Touching the screen will always highlight
the field, and a beeping sound will occure(every time), but
it will not always trigger an event(as in below "Say Something").
Bruce Houghton
"Paul Furbacher [TeamB]" <pfurbacher@mac.com> wrote in message
news:461c669a$1@newsgroups.borland.com...
> Bruce Houghton wrote:
>
>> When using MouseAdapters on JLists or JTables I seem to experience
>> missing events. Clicking on an area will always cause that area to be
>> highlited, but it won't allways cause and event.
>> One other thing, the Lists and Tables are in ScrollPanes
>> Q. Is there a better way to do this?
>> Q. Or is this the only way and I'm stuck with it?
>> Oh by the way, these are in JApplet's.....JRE1.5...
>> Bruce Houghton
>> Example:
>> JScrollPane jScrollPane = new JScrollPane(jTable1);
>> jScrollPane.setBounds(new Rectangle(20, 92, 480, 612));
>> jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
>> public void mouseClicked(MouseEvent e) {
>> JOptionPane.showMessageDialog(null, "Say Something");
>> }
>> });
>
> What are you trying to do? Show an alert just as a test of
> clicking?
>
> What's the ultimate desired behavior here? I can't see
> the forest for all the Qs.
>
>
> --
>
>
> Paul Furbacher (TeamB)
>
> Save time, search the archives:
> http://info.borland.com/newsgroups/ngsearch.html
>
> Is it in Joi Ellis's Faq-O-Matic?
> http://www.visi.com/~gyles19/fom-serve/cache/1.html
>
> Finally, please send responses to the newsgroup only.
> That means, do not send email directly to me.
> Thank you.
Technical Details
Message-ID:
<461d4e22@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<46166a31$1@newsgroups.borland.com> <461c669a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,dec980017feb87ab X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Bruce Houghton" <bhought@globalserve.net> From: "Bruce Houghton" <bhought@globalserve.net> Newsgroups: borland.public.jbuilder.java.swing References: <46166a31$1@newsgroups.borland.com> <461c669a$1@newsgroups.borland.com> Subject: Re: Missing events Date: Wed, 11 Apr 2007 17:08:21 -0400 Lines: 55 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 207.112.55.146 Message-ID: <461d4e22@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1176325666 207.112.55.146 (11 Apr 2007 14:07:46 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail