//i need to get app to print running in my console
code bellow//
package thepackage.moonrunner;
import java.awt.Container;
import javax.swing.*;
//window creation start
public class UserFrame extends JFrame {
UserFrame(){
setTitle("MoonRunner");
setSize (400,300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
public static void main(String[] args){
UserFrame f = new UserFrame();
Container cp = f.getContentPane();
}
//window creation end
public class Game implements Runnable {
private Thread thread;
private boolean running = false;
public synchronized void start() {
running = true;
thread = new Thread((Runnable) this,"Display");
thread.start();
}
public void run() {
while (running) {
System.out.println("running");
}
}
public synchronized void stop() {
running = false;
}
}
}