On Thu, 24 Sep 2026 20:31:12 GMT, Phil Race <[email protected]> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove close button and close menu from JOptionPane.JInternalFrame >> - Remove close button and close menu from JOptionPane.JInternalFrame >> - Remove close button and close menu from JOptionPane.JInternalFrame > > src/java.desktop/share/classes/javax/swing/JOptionPane.java line 1522: > >> 1520: } >> 1521: >> 1522: // Option dialogs should be closable only > > Seems like this comment is no longer accurate. I suggest to replace it with > something like > // Option dialogs should not be resizable etc., and internal option dialogs > are closed via a UI action, not a close button on the dialog title bar. updated comment > src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java > line 191: > >> 189: private static final String FRAME_TYPE = "JInternalFrame.frameType"; >> 190: private static final String OPTION_DIALOG = "optionDialog"; >> 191: > > These can only be used in this class, and you are using the string literals > every where else, which mostly defeats the purpose of these constants. > I note that we already have 4 occurrences of these .. so I won't ask for it > to change, but we ought to look into whether we need a client property > registry class (in sun/swing) that can hold such shared constants. I will look into it separately.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32169#discussion_r4100523457 PR Review Comment: https://git.openjdk.org/jdk/pull/32169#discussion_r4100525035
