Original Post
this be my code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TriApplet extends JApplet implements ActionListener {
double side1, side2, long_side;
JLabel side1Label, side2Label;
JTextField side1Field, side2Field;
JButton calculate;
public void init() {
Container c = getContentPane();
c.setLayout(new FlowLayout() );
side1Label = new JLabel("Length of First Side of Triangle: ");
c.add(side1Label);
side1Field = new JTextField (10);
side1Field.setEditable(true);
c.add(side1Field);
side2Label = new JLabel("Length of Second Side of Triangle: ");
c.add(side2Label);
side2Field = new JTextField (10);
side2Field.setEditable(true);
c.add(side2Field);
calculate = new JButton("Press to calculate the hypotenuse: ");
calculate.addActionListener(this);
c.add(calculate);
}
public void actionPerformed(ActionEvent e){
side1 = Double.parseDouble(side1Label);
side2 = Double.parseDouble(side2Label);
long_side = hypotenuse(side1, side2);
}
public double hypotenuse (double h_side1, double h_side2){
double side3_sq = h_side1 * h_side1 + h_side2 * h_side2;
double h_hypotenuse = Math.sqrt(side3_sq);
return h_hypotenuse;
}
}
and this is my error:
Unexpected Signal : EXCEPTION_FLT_STACK_CHECK (0xc0000092) occurred at PC=0xC2D1
52
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
0x00400000 - 0x00408000 C:\j2sdk1.4.2_03\bin\javac.exe
0x77F50000 - 0x77FF9000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F45000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5B000 C:\WINDOWS\system32\ADVAPI32.dll
0x77CC0000 - 0x77D35000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x00280000 - 0x002F3000 C:\DOCUME~1\Clothere\LOCALS~1\Temp\cfb1.tmp
0x77340000 - 0x773CB000 C:\WINDOWS\system32\COMCTL32.DLL
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x77D40000 - 0x77DCD000 C:\WINDOWS\system32\USER32.dll
0x71B20000 - 0x71B31000 C:\WINDOWS\system32\MPR.DLL
0x771B0000 - 0x772CA000 C:\WINDOWS\system32\OLE32.DLL
0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.DLL
0x71AD0000 - 0x71AD8000 C:\WINDOWS\System32\WSOCK32.DLL
0x71AB0000 - 0x71AC5000 C:\WINDOWS\System32\WS2_32.dll
0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.dll
0x76390000 - 0x763AA000 C:\WINDOWS\System32\IMM32.DLL
0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll
0x08000000 - 0x08138000 C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x5CD70000 - 0x5CD77000 C:\WINDOWS\System32\serwvdrv.dll
0x5B0A0000 - 0x5B0A7000 C:\WINDOWS\System32\umdmxfrm.dll
0x10000000 - 0x10007000 C:\j2sdk1.4.2_03\jre\bin\hpi.dll
0x009C0000 - 0x009CE000 C:\j2sdk1.4.2_03\jre\bin\verify.dll
0x009D0000 - 0x009E9000 C:\j2sdk1.4.2_03\jre\bin\java.dll
0x009F0000 - 0x009FD000 C:\j2sdk1.4.2_03\jre\bin\zip.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58C000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL
Heap at VM Abort:
Heap
def new generation total 576K, used 551K [0x10010000, 0x100b0000, 0x104f0000)
eden
****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC = 0x00c2d152
SIGNAL = -1073741678
FUNCTION NAME = (N/A)
OFFSET = 0xFFFFFFFF
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
Press any key to continue...
a) can anyone figure out, what''s wrong? as far as i know, i coded it correctly.
b) can someone be nice enough to compile it and tells me if it works? (i think it''s JC messing up, but not sure)
c) can someone recommend an easy to install Java IDE/compiler?
(actually i''ll check the thread for that. but to my knowledge none of the posts easy anything about an easy install....)
thanks!