The Artima Developer Community
Sponsored Link

Java Buzz Forum
Eclipse RCP Tip: Adding icon to 'System Tray'

1 reply on 1 page. Most recent reply: Jun 26, 2004 10:07 AM by E. Nielsen

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Vasanth Dharmaraj

Posts: 594
Nickname: vazz
Registered: Oct, 2003

Vasanth Dharmaraj is J2EE developer learning Dot Net
Eclipse RCP Tip: Adding icon to 'System Tray' Posted: Jun 26, 2004 8:25 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Vasanth Dharmaraj.
Original Post: Eclipse RCP Tip: Adding icon to 'System Tray'
Feed Title: Vasanth Dharmaraj's Blogs
Feed URL: /SyndicationService.asmx/GetRssCategory?categoryName=Technology%7CJava
Feed Description: my thoughts on dot net, java, linux, formula one, xbox gamming...(my java category)
Latest Java Buzz Posts
Latest Java Buzz Posts by Vasanth Dharmaraj
Latest Posts From Vasanth Dharmaraj's Blogs

Advertisement

Now that Eclipse 3.0 is almost out I am looking at writing applications using the Eclipse Rich Client Platform (RCP). I decided to convert the database monitor tool I blogged about yesterday in to a RCP application. I wanted it to appear as an icon in the 'System Tray' (it is actually should be called notification area :-)).

So I googled out a solution. Again it turns out I can do it with four lines of code.

Tray tray = display.getSystemTray();
TrayItem item = new TrayItem(tray, SWT.NONE);
item.setToolTipText("SWT Rocks!");
item.setImage(new Image(display, "red.png"));

A complete working example of this can be found here. This example also shows how to add menus to the icon. Like the tool tip says SWT rocks! :-)

Read: Eclipse RCP Tip: Adding icon to 'System Tray'


E. Nielsen

Posts: 9
Nickname: en
Registered: Feb, 2003

Re: Eclipse RCP Tip: Adding icon to 'System Tray' Posted: Jun 26, 2004 10:07 AM
Reply to this message Reply
> Now that Eclipse 3.0 is almost out

What do mean by "is almost out" ? ;-)

Oh btw, don't tell anyone - my download is still running, and it's a bit slow...

Flat View: This topic has 1 reply on 1 page
Topic: Rome HTTP Fetcher Previous Topic   Next Topic Topic: [Jun 18, 2004 00:42 PDT] 6 Links

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use