Monitoring Class Loading and Garbage Collection
The Swing component set in J2SE includes a special class for creating a panel to be placed in a popup window. You can use this panel to display a message to the user and to get a response from the user. The
Tutorial Details:
The second area of the JOptionPane is the message area. This is typically used to display a text message
When a user selects a button it signals the end of usage for the JOptionPane. Default sets of button labels are available. (As is the case for icons, these too come from property settings, such as OptionPane.yesButtonText.) You can also provide your own button labels. You can display any number of buttons (including no buttons) with any set of labels. The predefined button label is localized for several languages: English (en), German (de), Spanish (es), French (fr), Italian (it), Japanese (ja), Korean (ko), Swedish (sv), and two varieties of Chinese (zh_CN / zh_TW).
The JOptionPane class contains seven constructors, each returns a component that you can place anywhere. However, more typically you would use a factory method that creates the component and automatically places it inside a JDialog or JInternalFrame. There are eight of these factory methods (two varieties of four methods) that JOptionPane provides:
show[Internal]MessageDialog
show[Internal]ConfirmDialog
show[Internal]InputDialog
show[Internal]OptionDialog
The Internal variety creates a JOptionPane and shows it in a JInternalFrame. The other variety creates a JOptionPane and shows it in a JDialog. This tip only discusses the dialog variety.
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Monitoring Class Loading and Garbage Collection
View Tutorial: Monitoring Class Loading and Garbage Collection
Related
Tutorials:
Revolutionary RMI: Dynamic
class loading
and behavior
objects - JavaWorld - December 1998
Revolutionary RMI: Dynamic
class loading
and behavior
objects - JavaWorld - December 1998 |
Improve the
robustness and performance of your ObjectPool - JavaWorld - August 1998
Improve the
robustness and performance of your ObjectPool - JavaWorld - August 1998 |
Singletons vs.
class (un)loading - JavaWorld - May
1998
Singletons vs.
class (un)loading - JavaWorld - May
1998 |
Understanding Java Card 2.0 - JavaWorld March 1998
Understanding Java Card 2.0 - JavaWorld March 1998 |
Clearing resources
Clearing resources |
Smart object-management saves the
day - JavaWorld November 1999
Smart object-management saves the
day - JavaWorld November 1999 |
Use the JVM
Profiler Interface for accurate timing -
JavaWorld
Use the JVM
Profiler Interface for accurate timing -
JavaWorld |
Activatable Jini services, Part 2: Patterns of use
- JavaWorld
October 2000
Activatable Jini services, Part 2: Patterns of use
- JavaWorld
October 2000 |
When is a Singleton not a
Singleton? - JavaWorld January 2001
When is a Singleton not a
Singleton? - JavaWorld January 2001 |
Performance books put to the test - JavaWorld March 2001
Performance books put to the test - JavaWorld March 2001 |
Accelerate your RMI
programming
Accelerate your RMI
programming |
Pick up
performance with generational garbage
collection
Pick up
performance with generational garbage
collection |
J2ME devices:
Real-world performance
J2ME devices:
Real-world performance |
J2SE 1.4.1
boosts garbage
collection
J2SE 1.4.1
boosts garbage
collection |
Object equality
Object equality
Writing equals and hashCode methods for data objects
Summary
In this article, Alex Blewitt describes the two most common methods in the Java language—equals() and hashCode()—and shows how they can be implemented correctly. The |
Tuning garbage collection in the HotSpot JVM
Packing 100 megabytes of garbage into a 50 megabyte bag. |
Garbage Collection in the Java HotSpot Virtual Machine
Garbage Collection in the Java HotSpot Virtual Machine
Gain a better understanding of how garbage collection in the Java HotSpot VM works, and learn to take full advantage of it when designing, developing, and deploying your Java applications. |
Java Application Instrumentation with Log4J
Java Application Instrumentation with Log4J
Application metrics, such as performance metrics, are key to understanding and improving application efficiency. Profiling and monitoring tools yield valuable information on CPU and resource usage, including OS |
Using JConsole to Monitor Applications
JConsole is the Java Monitoring and Management Console, a new graphical tool shipped in J2SE JDK 5.0. This article describes how JConsole can be used to observe information about an application running on the Java platform, with an overview of the J2SE 5. |
Core Java Interview Questions!
Core Java Interview Questions!
Core Java Interview Questions
Question: What is transient variable?
Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written |
|
|
|