Search code examples
javaswingjoptionpanejdialogtitlebar

Remove OK Button


When the user types the text into the field and presses create. The JFrame title changes to updated user title. The JFrame title variable is in --Window.java-- and the user input is in --NewFileBox.java--. I don't know how you would implement the changes from separate files.


Solution

  • Try

    JOptionPane.showOptionDialog(null, nfb.inputs, "Create", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, new Object[]{}, null);
    

    Arg:

    *"Create" --> User define title of Dialog Box