-
Enhancement
-
Resolution: Won't Fix
-
P5
-
None
-
5.0
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
JFrame and JDialog implement many similar methods and do many of the same things. However, the closest their closest common ancestor is Window, which makes it difficult to write code that deals with either JFrames or JDialogs but not WIndows.
JUSTIFICATION :
It would be nice to provide an extra constructor to both JFrame and JDialog that would accept objects extending this interface.
This would also allow a method to be added to Component that could be called getRoot() that would return either the first Frame or Dialog that this component is a child of. This is an operation I have to perform often, and it's troublesome having to handle both the Dialog and Frame cases.
JFrame and JDialog implement many similar methods and do many of the same things. However, the closest their closest common ancestor is Window, which makes it difficult to write code that deals with either JFrames or JDialogs but not WIndows.
JUSTIFICATION :
It would be nice to provide an extra constructor to both JFrame and JDialog that would accept objects extending this interface.
This would also allow a method to be added to Component that could be called getRoot() that would return either the first Frame or Dialog that this component is a child of. This is an operation I have to perform often, and it's troublesome having to handle both the Dialog and Frame cases.