1 Reply Latest reply: May 28, 2013 1:30 AM by r035198x RSS

    remove the icon on a jdialog whick has a owner

    1010009
      JFrame frame = new JFrame();
      frame.setIcon("aaa.ico");
      JDilaog dialog = new JDialg(frame, "dialog" , true);

      so the dialog has its owner frame, which is neccessary
      but i want the dialog has another icon ,or remove the icon on the dialog
      how may i do ?
        • 1. Re: remove the icon on a jdialog whick has a owner
          r035198x
          They both have the setIconImage method so just set different images for each before showing them
            frame.setIconImage(ImageIO.read(Test.class.getResourceAsStream("someImage.jpg")));
            JDialog dialog = new JDialog(frame, "dialog" , true);
            dialog.setIconImage(ImageIO.read(Test.class.getResourceAsStream("anotherImage.jpg")));