html - Just started with Java, I think I need to include new classes. -
i added new classes end of xcode java project creator , firefox says doesn't support java won't load of options, may or may not correctly formatted. i'm sure should including new classes have suggestions. i've studied basics , websites i'm trying use learn java limited or technically down @ moment. i've tried convert html think online converters outdated. there anyway generate html java codes program render somewhat?
// // hovercraft.java // hovercraft // // created getting nifty on 12/5/14. // copyright (c) 2014 __mycompanyname__. rights reserved. // // simple signed java applet // import java.awt.*; import java.applet.*; import javax.swing.*; public class hovercraft extends japplet { static final string message = "hello world!"; private font font = new font("serif", font.italic + font.bold, 36); public void init() { // set default , feel string laf = uimanager.getsystemlookandfeelclassname(); try { uimanager.setlookandfeel(laf); } catch (unsupportedlookandfeelexception exc) { system.err.println ("warning: unsupportedlookandfeel: " + laf); } catch (exception exc) { system.err.println ("error loading " + laf + ": " + exc); } getcontentpane().setlayout (null); } public void paint (graphics g) { super.paint(g); g.setcolor(color.blue); g.setfont(font); g.drawstring(message, 40, 80); } public class interface int class hovercraft1 { forward() backward() rotateto(int angle,booleanimmediatereturn) stop() public waitforpress1(go) public waitforpress2(stop) public waitforpress3(idle) static drawstring(string str, int x, int y) static shutoff(waitforpress2) static turnon(waitforpress1) static boolean(ismoving) static boolean(isrunning) public isstop public ismoving public isrunning public idle public processvoidstore static processreturn 3/4 x null static processcorrectslow( static boolean(isstop) println.txt stopping static boolean(isgo) status.println(waitforpressn) rotateto(int angle,booleanimmediatereturn) ifclass(isstop) public class xturn public class xturn2 public class obstruction public class roaddebree(if class change) int class change int class airpressure int class vacuum1pressure int class vacuum2pressure int class vacuum3pressure int class vacuum4pressure boolean class balloon int class balloonclose(balloon%) int stop args(boolean open balloon; boolean close balloon%; vacuum1, vacuum2, vacuum3, vacuum4) }
you need jsp (java server pages) , rename file extension .jsp instead of .html . recommend doing jsp tutorial. jsp you'll pretty have html page java code running inside doing stuff.
Comments
Post a Comment