[program-java] access bridge problem or just doing something wrong?

  • From: Florian-achtige <florianbeijers@xxxxxxxxx>
  • To: program-java@xxxxxxxxxxxxx
  • Date: Mon, 4 Oct 2010 13:36:34 +0200

Hey list,

I've been trying to get into java stuff, and it goes alright. Until i
start messing with something that slightly resembles UI use. I've
tried running the following code:

import java.awt.*;
public class RootApplet extends javax.swing.JApplet {
int number ;
public void init() {
number = 225;
}
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D) screen;

screen2D.drawString("The square root of " + number + " is " +
Math.sqrt(number), 5, 50);
}
}


I have the access bridge installed, I think. I've run it a few times.
The setup program, that is. It takes a very long time to search on
disks for java VM's, i think five minutes if not more. The code listed
above however gives me a blank line and thats it. Also my java command
works, but javac and appletviewer do work. My jdk is also saved in
c:\sun instead of c:\program files\blahblahblah. I had to ask for
sighted assistance to get the jdk installed anyway so I dunno what
exactly is going on here. Could someone please try to help me get
these things fixed, on this list or offlist on my email or skype/msn?
skype: balliol1
msn: florianbeijers@xxxxxxxxxxx

Thanks in advance for all your help. To be honest it's kinda
frustrating me to run very simple tutorial-level code and to have this
happen.

Thanks,
Florian

Other related posts: