Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30675

Re: Messagebox on current desktop

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.tele2net.at!news.panservice.it!feed.xsnews.nl!border01.ams.xsnews.nl!feeder04.ams.xsnews.nl!feeder03.ams.xsnews.nl!frontend-F09-10.ams.news.kpn.nl
From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.java.programmer
Subject Re: Messagebox on current desktop
Organization Decebal Computing
References <87387n7cw4.fsf@Equus.decebal.nl> <54b1f65a$0$288$14726298@news.sunsite.dk>
X-Face "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR<J%a^F2lh4[N~Yz4 nSp#c+aQo1b5=?HcNEkQ7QzF<])O3X4MDL/AYjys&*mt>,v+Pti8=Vi/Z"g^?b"E
X-Homepage http://www.decebal.nl/
Date Sun, 11 Jan 2015 18:17:07 +0100
Message-ID <87bnm58cfg.fsf@Equus.decebal.nl> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
Cancel-Lock sha1:vEwbyFAwlHYfIeH7COEnRcZitYQ=
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Lines 31
NNTP-Posting-Host 77.171.42.144
X-Trace 1420997316 news.kpn.nl 19518 77.171.42.144@kpn/77.171.42.144:58899
Xref csiph.com comp.lang.java.programmer:30675

Show key headers only | View raw


Op Sunday 11 Jan 2015 05:04 CET schreef Arne Vajhøj:

> On 1/6/2015 5:38 PM, Cecil Westerhof wrote:
>> You can get a Messagebox with:
>> JOptionPane.showMessageDialog(this,
>> "Message",
>> "Title",
>> JOptionPane.INFORMATION_MESSAGE,
>> null);
>>
>> The problem is that I work with Linux and have several desktops.
>> The messagebox is displayed on the desktop where the program is
>> running. Is there a method to get the messagebox on the current
>> desktop?
>>
>> For example the program is running on desktop 3. I am working on
>> desktop 1. Instead of the messagebox displayed on desktop 3 (where
>> I will not see it), I want it displayed on desktop 1.
>
> Try something like:
>
> JFrame f = new
> JFrame(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration());
> JOptionPane.showMessageDialog(f, "Test"); f.dispose();

Thanks, that does what I want.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Messagebox on current desktop Cecil Westerhof <Cecil@decebal.nl> - 2015-01-06 23:38 +0100
  Re: Messagebox on current desktop Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-01-06 18:13 -0500
    Re: Messagebox on current desktop Knute Johnson <eternal@knutejohnson.com> - 2015-01-06 16:04 -0800
  Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 07:14 -0500
    Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 07:19 -0500
    Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 07:39 -0500
      Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 08:44 -0500
      Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 10:17 -0500
        Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 10:37 -0500
    Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 09:11 -0500
      Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 09:41 -0500
      Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 09:46 -0500
        Re: Messagebox on current desktop Jeff Higgins <jeff@invalid.invalid> - 2015-01-07 09:49 -0500
  Re: Messagebox on current desktop Arne Vajhøj <arne@vajhoej.dk> - 2015-01-10 23:04 -0500
    Re: Messagebox on current desktop Cecil Westerhof <Cecil@decebal.nl> - 2015-01-11 18:17 +0100

csiph-web