/    Sign up×
Community /Pin to ProfileBookmark

JFrame will not work

My JFrame app will refuse to work I dont know why some PLEASE help
(BY LOOKING AT THE FOLLOWING YOU NEED TO PROMISE YOU WONT TAKE AND USE THIS CODE.
THIS IS FOR SOFTWARE SO I WILL NOT ACCEPT THIS STOLEN AND REMADE)
Ok so I compiled the following with (javac) and made it into a .jar file
but the application won’t work, heres the code and the manifest
MANIFEST (manifest.txt)

[code]
Main-Class: MEM
[/code]

CLASSES (FROM:”FLIP.java”,FILES:”MEM.class, Window.class, MnMthd.class”)

[code]
//stage: INDEV
import javax.swing.JFrame;
import java.util.*;

class MEM {
static String Path;
static boolean thistrue = false;
public static void Mbank() {
String Files;
String Directory;
Files = “”;
Scanner dir = new Scanner(System.in);
Directory = dir.nextLine();
Path += Directory;
try{
if(thistrue == false){
if(Directory != Files) {
Files = Directory;
thistrue = true;
}
}
}
catch(Exception e){
System.out.println(“the main path is:”+Path);
System.out.println(“opening”);
}
}
}
class Window extends JFrame {
public static void win() {
JFrame win = new JFrame(“TEST PRODUCT”);
win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
win.setVisible(true);
win.setSize(500,500);
}
}
class MnMthd {
public static void main(String[] args) {
MEM Exc = new MEM();
Exc.Mbank();
Window w = new Window();
w.win();
}
}
/*

credits:

Piko (OWNER/MAIN DEVELOPER)

NogDog

root

stack overflow (Website)

*/
[/code]

but the JFrame Will not open, why?
also email me at [email protected] if you can help me more in depth and be a programming partner (THANKS)

to post a comment
Java

1 Comments(s)

Copy linkTweet thisAlerts:
@TheFanOfPixelsJan 04.2019 — You're calling win() from an object reference, but win() is static. Try calling it like this:

Window.win()

or make win() non-static.
×

Success!

Help @PDS_OWNER_Calin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...