Skip to content

Tag: joptionpane

how to configure joptionpane with no button to dispose()?

i would like to display a message while initialisation of data using a dialog. But it does’t want to close and I can’t see what is wrong with this code : Thank you Answer This… is wrong. Once the dialog is made visible, it will wait till it’s closed before continuing the flow of execution, it’s one of the neat

Display all the items I have ordered

How to display all the items I have ordered in “Sales Report File”? Like whenever I ordered 2 cookies, It will display on the Sale Report file. I have this code currently.. Answer If you want like a text list of what you have ordered, you can simply create an ArrayList<String> and every time you click on a product you

Printing stack trace in JOptionPane

My question: How can i put the text e.printStackTrace prints into a JOptionPane window My code is currently as follows: excuse the poor formatting 😛 this both prints the stack trace in the command line interface(i am using terminal) and it creates a JOptionPane but NOT with the same info as e.printStackTrace(). when running my program from a jar file,