Article View: borland.public.jbuilder.java.swing
Article #678Re: Javahelp on JOptionPane
From: Bart Jourquin
Date: Fri, 14 Jan 2005 13:11
Date: Fri, 14 Jan 2005 13:11
27 lines
2271 bytes
2271 bytes
Thanks. This is what I was trying here now, but I was hoping that there was a more simple way... Bart John McGrath [TeamB] wrote: > On 1/14/2005 at 3:03:40 AM, Bart Jourquin wrote: > > >>I use JavaHelp in my app to create a context sensitive help system. I've >>choosen to implement it by means of the "help" or "f1" key using >>HelpBroker.enableHelpKey method. This work perfectly well as long as I >>can have access to the component that has the focus. >> >>How can I do it for JOptionPane.showXXX methods? > > > That is tough, because the showXxxxDialog() methods do not give you access > to the actual JOptionPane component. In the showMessageDialog() case, if > you use a JComponent for a message, you can have it look at its parent, > but that does not work in other cases. > > You can still use most of the functionality of JOptionPane, but instead of > using the showXxxxDialog() methods, create a JOptionPane component, create > the Dialog using the createDialog() method, and show that. Basically, you > want to create your own showXxxxDialog() methods. You can look at the > source code for those methods to see what needs to be done. >
Technical Details
Message-ID:
<41e7c512$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41e77cda$1@newsgroups.borland.com> <xn0dx8mtugg593k003@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,120ee6ce4cc4028f X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 14 Jan 2005 14:11:47 +0100 From: Bart Jourquin <bart.jourquin@fucam.ac.be> User-Agent: Mozilla Thunderbird 0.9 (X11/20041127) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Javahelp on JOptionPane References: <41e77cda$1@newsgroups.borland.com> <xn0dx8mtugg593k003@newsgroups.borland.com> In-Reply-To: <xn0dx8mtugg593k003@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.190.244.18 Message-ID: <41e7c512$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1105708306 193.190.244.18 (14 Jan 2005 05:11:46 -0800) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail