Skip to content
← Back to Community
Display Not Capable of DPMS Java Swing
Profile icon
SangeetS

I started a Java Swing repl and copied some code from a textbook, but it doesn't work! I keep getting this error: 'Display not Capable of DPMS.' If it doesn't mean anything, what should I do?? The console just outputs 'Hello World' and the applet doesn't show anything.
Here is the link to my code: https://repl.it/@SangeetS/SimpleUI (under SalutonFrame.java)

Answered by TheDrone7 [earned 5 cycles]
View Answer
Voters
Profile icon
Hassan235
Profile icon
RB-11ZZ-952996
Profile icon
Safyre
Profile icon
Quack4321
Profile icon
SangeetS
Comments
hotnewtop
Profile icon
TheDrone7

The issue is that repl.it runs the code from the Main.java file and it only has the code to print Hello World to the console. If you need to run some piece of code, you need to make sure it's in the main file and not in some other file. Of course you can import from other files into the main file but the main function of the Main.java file will be executed. Not the main function of some other file.

Profile icon
SangeetS

@TheDrone7 Thanks :)

Profile icon
SangeetS

@TheDrone7 However, when I run it, the JFrame is supposed to have the title be "All me." It doesn't do that. Please advise.

Profile icon
TheDrone7

@SangeetS as far as I can see, it does have that title.
Screenshot_20190615_003715

Profile icon
SangeetS

@TheDrone7 there recently was a notification that said that 'there is a new version of repl.it. Click here to reload' and that made it work. THANKS for everything!

Profile icon
SangeetS

I declare this question ANSWERED