jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

View:
Swing FAQ Home Page

FAQ Manager is guru Sandip Chitale PREMIUM.

As part of the Java Foundation Classes (JFC), the Swing component set builds on the AWT to provide a pure Java-based graphical user interface (GUI) for your programs.

What's New

How do I specify the popup menu to show for an application on the system tray?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
When you create the TrayIcon for the SystemTray, you specify the PopupMenu. TrayIcon trayIcon = new TrayIcon(anImage, "Tooltip", aPopupMenu); Just...
If I want to manually size my icon for the system tray, how do I find out the correct size for the platform?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
The getTrayIconSize() method of SystemTray will return the appropriate Dimension for the icon. This allows you to either pick the most appropriate size...
How do you find out if the user's platform supports adding applications to the system tray?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
Ask the SystemTray class with its static isSupported() method. The javadoc for the class includes a warning when true is returned. Just because the system...

How do I specify an icon to include with a message over a system tray application icon?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
The TrayIcon.MessageType enumeration allows you to specify an ERROR, INFO, or WARNING icon, in addition to NONE when displaying a message with displayMessage()....
How do I show a popup message over a system tray icon/application?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
The displayMessage() method of TrayIcon allows you to show a timed message, if supported on the platform.
How do I place a tooltip over a system tray icon?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
The TrayIcon class offers a setToolTip() method to provide a string for the message.
How do I know what size icon to use for an application on the system tray?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jan 2, 2008
If you don't want to size the icon yourself, you can call setImageAutoSize() with a value of true for the TrayIcon. By default, the property is false....
How do I clear the selection in a ButtonGroup such that no elements of the associated set of abstract buttons are selected?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Jul 8, 2007
Early versions required a hack with a hidden button. In Java 6, you can use the new clearSelection() method.
When dropping an object over a JTree, how do you determine the node being dropped over?
Java:API:AWT:Drag and Drop, Java:API:Swing:Widgets
John Zukowski PREMIUM, May 31, 2007
The importData() method of your TransferHandler has a TransferSupport argument. From this support object, you can ask for the drop location with getDr...
When having a droppable JTree, how do I change the default behavior of using selection to see the active drop target?
Java:API:AWT:Drag and Drop, Java:API:Swing:Widgets
John Zukowski PREMIUM, May 31, 2007
JTree has a setDropMode() method to change the default setting of USE_SELECTION. Other valid modes are ON, INSERT, and ON_OR_INSERT. ON lets you drop something...
When creating a Yes/No JOptionPane, how do I default the value to No instead of Yes?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Mar 9, 2007
You need to explicitly pass in the button labels and initial value via the showOptionDialog() method (or constructor). int selection = JOptionPane....
What accessible roles were added to the 1.4 J2SE accessibility API?
Java:API:AWT:Accessibility, Java:API:Swing:Accessibility
John Zukowski PREMIUM, Dec 31, 2006
Class AccessibleRole Added the following constants: DATE_EDITOR FONT_CHOOSER GROUP_BOX SPIN_BOX STATUS_BAR
How can I find out if my application is being used with a screen magnifier?
Java:API:AWT:Accessibility, Java:API:Swing:Accessibility
John Zukowski PREMIUM, Dec 31, 2006
The javax.accessibility.screen_magnifier_present property is available. When true, the magnifier is present, and your application can be altered accor...
Which accessible interfaces were added for J2SE 1.4?
Java:API:AWT:Accessibility, Java:API:Swing:Accessibility
John Zukowski PREMIUM, Dec 31, 2006
The 1.4 API increased the accessibility API by adding the following: javax.accessibility.AccessibleEditableText javax.accessibility.AccessibleExt...
What is the purpose of AccessibleExtendedComponent?
Java:API:AWT, Java:API:Swing
John Zukowski PREMIUM, Dec 4, 2006
The original accessible API set missed some features in the AccessibleComponent interface. Since the main interface couldn't be altered, Sun introduced...
What screen readers are available for Swing-based programs?
Java:API:Swing:Widgets
John Zukowski PREMIUM, Nov 27, 2006
While the Java Access Bridge (http://java.sun.com/products/accessbridge/) exposes the Swing components to the platform, it seems not all screen readers...
Does Java work with Windows Vista?
Java:API:Swing, Java:Language
John Zukowski PREMIUM, Oct 31, 2006
Chet Haase at Sun claims "Java on Vista: Yes, it Works" at http://weblogs.java.net/blog/chet/archive/2006/10/java_on_vista_y.html. There is more said there...
How can I print the contents of a JTable as a report with title, date/time etc. as a formatted report on a paper?
Java:API:Swing
John Zukowski PREMIUM, Oct 31, 2006
This was previously answered for earlier versions of the JDK at http://www.jguru.com/faq/view.jsp?EID=46732. Now, with J2SE 5, you can just call the print()...
Are there any predefined file filters for a JFileChooser?
Java:API:Swing:Widgets, Java:API:IO:Filters
John Zukowski PREMIUM, Jun 30, 2006
Apart from the accept all filter, until Java 6, there were no predefined filters. Java 6 introduces the FileNameExtensionFilter, allowing you to define...
How can I write over a splash screen?
Java:API:Swing
John Zukowski PREMIUM, Mar 31, 2006
With Java 6, prior to the main window of the application showing, you can get the splash screen via SplashScreen splash = SplashScreen.getSplashScreen();,...
« previous beginning next »


Ask A Question



Related Links

Swing Forum

Sun's Swing Home Page

The Swing Connection

Swing in the Java Tutorial

Swing Short Course, part I

Swing Short Course, part II

Wish List
Features
About jGuru
Contact Us

 




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
ServerWatch.com Article: Virtualization Enters the SMB World
ITChannelPlanet.com Article: Emerging E-Discovery Market Grows More Vital for VARs
StoreVault Whitepaper: Introduction to Networked Storage
Oracle eBook: Implementing Business Intelligence in Your Organization
Hoovers Sales Tip: Building Credibility with New Clients
SAP Whitepaper: A Corporate Guide to Better Decisions Through IT
Microsoft Article: Flexibility, Agility the Keys to Dynamic IT
Microsoft Article: Improving Infrastructure Management for Mid-Size Companies
IBM Whitepaper: CIO Insights--Ignite Innovation by Fusing Business and IT
IBM Whitepaper: Transforming Legacy Apps into SOA
Internet.com eBook: All About Botnets
Intel Article: 8 Simple Rules for Designing Threaded Applications
Symantec Whitepaper: E-Mail Discovery--Worst-Case Scenarios Versus Best Practices
Ipswitch Whitepaper: Secure File Transfer In the Era of Regulatory Compliance
Symantec Whitepaper: A Unified, Proactive Approach to Endpoint Security
APC eBook: Putting the Green in IT
Intel Whitepaper: Best Practices for Developing and Optimizing Threaded Applications
Symantec Whitepaper: Emerging Trends in Fighting Spam
Oracle eBook: Guide to Oracle 11g and Database Migration
Symantec Whitepaper: Best Practices for IM Archiving & Compliance
Intel Article: The Challenges of Developing Multithreaded Processing Pipelines
Avaya Whitepaper: SIP--Creating Next-Generation Telecom Applications
Avaya Article: Event Processing Demands Real-Time Response for Communications-Enabled Business Apps
MessageLabs Whitepaper: Spam Spikes--A Real Risk to Your Business
Symantec Article: Guarding the Corporate Gateway
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Epicor Webcast: Requirements to Consider When Looking at ITSM Tools
Intel Video: Three Must-Knows for Parallelism
Microsoft: NXT Web Seminar Series
Microsoft Partner Program Video: The Secrets to Partner Success
Rational Asset Manager: Succeed with Asset-based Development
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
NXPowerLite: Desktop Edition Software Trial
IBM Rational Systems Development Solution e-Kit
IBM SOA Development Survival Guide eKit
Evaluate IBM Rational Build Forge Online
IBM Enterprise Architect eKit for SOA
Evaluate Rational Application Developer Online
Iron Speed Designer Application Generator
Symantec IM Detection Utility
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM Overview Video: Next Generation Data Warehousing
IBM Tutorial: Intro to XML User Interface Language (XUL) Development
Microsoft How-to Article: Get Going with Silverlight and Windows Live
IBM Tutorial: The Ajax Transport Method
IBM Tutorial: Learning PHP
IBM Tutorial: Validating XML
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES