Category: | Feature request |
Priority: | Low |
Status: | Assigned |
Project: | Severity: | Trivial |
Resolution: | Open |
|
Component: | Reproducibility: | Always |
Assigned to: |
Issue moved from:
https://sourceforge.net/tracker/index.php?func=detail&aid=1503423&group_...
Consult the original issue for any attachments.
[ 1503423 ] Center Dialogs depending on MainFrame
Submitted By: Bonkers - darthbonkers
Date Submitted: 2006-06-09 03:07
Last Updated By: gt78 - Comment added
Date Last Updated: 2006-06-22 09:36
Number of Comments: 1
Number of Attachments: 0
Assigned To: Giulio Toffoli
Priority: 5
Summary:
Center Dialogs depending on MainFrame
Hi,
maybe it is not a bug, i dont take a look into the source code, but if i open dialogs they are always in the middle of my 2 Screens (using linux). So maybe iReport use setLocationRelativeTo(null) and not something like setLocationRelativeTo(it.businesslogic.ireport.gui.MainFrame)?
Last one should center the dialog relativ to the iReport MainFrame.
Thanks for the great Tool!
Regards Bonkers
Comments
Date: 2006-06-22 09:36
Sender: gt78SourceForge.net SubscriberProject Admin
Logged In: YES
user_id=616744
I use a static method in it.businesslogic.ireport.util.Misc to center frames.
Here is the code:
public static void centerFrame(java.awt.Component c) {
java.awt.Toolkit tk =
java.awt.Toolkit.getDefaultToolkit();
c.setLocation((int)((tk.getScreenSize
().getWidth()-c.getWidth())/2),
(int)((tk.getScreenSize().getHeight()-
c.getHeight())/2) );
}
I simply center the window on the screen. You can change this method to fix your problem, but I don't think that center a frame inside the MainFrame is the best solution.
Anyway I don't see this as a bug, I'll move this submission to the RFE.
Let me know.
Thanks a lot.
Giulio
No Files Currently Attached