+ 16
Import javax. swing.*;
This packge I use but not work why? import javax.swing.*; class simple{ public static void main(String arg[]){ JOptionPane.showMessageDialog(null,"hello"); } }
10 Respostas
+ 12
Yaa some operating system it will work....
+ 11
But not give output I also import package write ? But give output memory limit exceeded?
+ 9
Thank you so much 😇 😇
+ 6
Please in detailVikram Joya
+ 2
If this code is an exact copy, it probably doesn't work because you didn't use the import keyword
+ 2
Use JOptionPane inside try catch
+ 2
You should use JOpationPane inside the try block then it will work otherwise it's throw an exception or an error
+ 1
First line should be:
import javax.swing.*;
Are you doing it here? Using swing on sololearn isn't a good idea.
+ 1
It's impossible, swing is about windows, buttons, while sololearn Java is just a console.
But don't worry, it will be better for your skills to program on normal operating system.
+ 1
Best practices : import specific class -> Import.java.swing.specificClass