On Fri, 26 Jul 2024 16:52:44 GMT, Alisen Chung <ach...@openjdk.org> wrote:
> Currently if you try to use graphics to draw a string on a frame using > JOptionPane + JTextField with a listener as a prompt, the string will not > draw. Adding a repaint after dialog.dispose in JOptionPane will cause the > text to show after the dialog is closed. Could you please add a test case to validate the fix ? test/jdk/javax/swing/JOptionPane/OptionPaneInput.java line 41: > 39: * @test > 40: * @bug 8235404 > 41: * @summary temp Please update summary. test/jdk/javax/swing/JOptionPane/OptionPaneInput.java line 44: > 42: * @library /java/awt/regtesthelpers > 43: * @build PassFailJFrame > 44: * @run main OptionPaneInput Suggestion: * @run main/manual OptionPaneInput test/jdk/javax/swing/JOptionPane/OptionPaneInput.java line 58: > 56: > 57: public static void main(String[] args) throws Exception { > 58: // > UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel"); Please remove commented lines. test/jdk/javax/swing/JOptionPane/OptionPaneInput.java line 73: > 71: > 72: // > RepaintManager.currentManager(f).setDoubleBufferingEnabled(false); > 73: // > RepaintManager.currentManager(c).setDoubleBufferingEnabled(false); Please remove commented lines. test/jdk/javax/swing/JOptionPane/OptionPaneInput.java line 100: > 98: // g2.setColor(Color.BLACK); > 99: // g2.drawString("Dialog Closed", 10, 25); > 100: // g2.dispose(); Please remove commented lines. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20359#issuecomment-2257719774 PR Review Comment: https://git.openjdk.org/jdk/pull/20359#discussion_r1697897139 PR Review Comment: https://git.openjdk.org/jdk/pull/20359#discussion_r1697897469 PR Review Comment: https://git.openjdk.org/jdk/pull/20359#discussion_r1697897717 PR Review Comment: https://git.openjdk.org/jdk/pull/20359#discussion_r1697897950 PR Review Comment: https://git.openjdk.org/jdk/pull/20359#discussion_r1697897827