Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2005

Tip: Looking for answers? Try searching our database.

Why I got 2 PrintDialog in my JPanel class, if I create it again ???

Thread view: 
Dado - 08 Feb 2005 22:32 GMT
This class is called from frameMain which extends JFrame:

public class Print extends JPanel implements ActionListener, Printable {
....
   if (job.PrintDialog()) {
               ...
   }
....
}

It is a typicall print class which works fine:
Print print = new Print(...)

But if I wrote print = null and create it again:
print = new Print(...)

after I press the print button, I got 2 print dialog (or more if I created
it more times).

Why?
What I must to initialize again?

p.s.
I even started System.gc();
Dado - 09 Feb 2005 20:04 GMT
> This class is called from frameMain which extends JFrame:
>
[quoted text clipped - 20 lines]
> p.s.
> I even started System.gc();

I found a solution of a problem:
ActionListener for a Print button must be added only ones.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.