Link to home
Start Free TrialLog in
Avatar of nagulas
nagulas

asked on

what is the use of dispose() function.

What is the use if dispose( ) function in Java and can any one give me some areas where we use dispose function.
And one more question, what does it mean if we use this( ) function in Java, does it mean it calls the constructor of that class or any thing else.

please let me know.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nagulas
nagulas

ASKER

how about this() function ?
this isn't a function, it is a variable referencing the 'current' object.

www.mindprod.com/jgloss/this.html
Actually,  "this()", in that reference, is calling a function, but specifically the no-argument constructor of the "current" object.

Java Joe Morgan
Hi, nagulas. One thing I learned about Swing applications is to use either Dispose_On_Close (when I'm closing one JFrame and opening another):

     myFrame.setDefaultCloseOperation(myFrame.DISPOSE_ON_CLOSE);  

or use Exit_On_Close when I want to completely end the application with any associated JFrames:

     myFrame.setDefaultCloseOperation(myFrame.EXIT_ON_CLOSE);