What's Here?
- Members: 340,049
- Replies: 920,191
- Topics: 154,887
- Snippets: 4,853
- Tutorials: 1,256
- Total Online: 4,526
- Members: 131
- Guests: 4,395
|
Welcome to Dream.In.Code |
|
|
Become an Expert!
Join 340,049 Programmers for FREE! Get instant access to thousands  of experts, tutorials, code snippets, and more! There are 4,526 people online right now. Registration is fast and FREE... Join Now!
Chat LIVE With a Expert
|
please compile mine is down
please compile mine is down
Rate Topic:
   
-
Group:
Members
-
Posts:
70
-
Joined:
11-December 08
Dream Kudos: 0
Posted 07 May 2009 - 08:44 AM
hey can yall compile this for me and post back the byte code.
my compiler is GONE?
please and thank you
import java.util.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import java.io.*;
public class AoT {
JFrame frame = new JFrame("Area Of Triangle");
JPanel up = new JPanel();
JPanel center = new JPanel();
JPanel right = new JPanel();
JPanel left = new JPanel();
JPanel down = new JPanel();
JLabel inturs = new JLabel("Enter your sides a, b, & c");
JLabel area = new JLabel("Area = ");
JLabel answer = new JLabel();
JButton solve = new JButton("Solve");
JLabel side1 = new JLabel("Side a");
JLabel side2 = new JLabel("Side b");
JLabel side3 = new JLabel("Side c");
JTextField sidea = new JTextField(5);
JTextField sideb = new JTextField(5);
JTextField sidec = new JTextField(5);
public static void main(String[] args) {
// TODO Auto-generated method stub
new AoT().buildGUI();
}
public void buildGUI() {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
///add panels to the frame.
frame.getContentPane().add(BorderLayout.NORTH, up);
frame.getContentPane().add(BorderLayout.CENTER, center);
frame.getContentPane().add(BorderLayout.SOUTH, down);
frame.getContentPane().add(BorderLayout.EAST, right);
frame.getContentPane().add(BorderLayout.WEST, left);
//add stuff to panels
up.add(inturs);
center.add(sidea);
center.add(sideb);
center.add(sidec);
left.add(side1);
left.add(side2);
left.add(side3);
left.add(area);
right.add(solve);
down.add(answer);
//add listener
solve.addActionListener(new MySolveListener());
//set vis
frame.setSize(500,500);
frame.setVisible(true);
}
public class MyDownTempoListener implements ActionListener {
public void actionPerformed(ActionEvent a) {
int a = Integer.parseInt(sidea.getText());
int b = Integer.parseInt(sideb.getText());
int c = Integer.parseInt(sidec.getText());
int s = .5 * (a+b+c);
int N = s * ((s-a) * (s-b) * (s-c));
int A = Math.sqrt(N);
String Area = Integer.toString(A);
answer.setText(A);
}
}
}
Posted 07 May 2009 - 09:36 AM
This is certainly a bizarre request. It's faster if you just download the JDK again and then javac your code. You don't want someone giving you a viral .class file anyway.
javac AoT.java;
java AoT;
Are the commands.
This post has been edited by WolfCoder: 07 May 2009 - 09:37 AM
Posted 07 May 2009 - 11:57 AM
WolfCoder, on 7 May, 2009 - 09:36 AM, said:
This is certainly a bizarre request. It's faster if you just download the JDK again and then javac your code. You don't want someone giving you a viral .class file anyway.
javac AoT.java;
java AoT;
Are the commands.
Actually, for JUST such occasions there is this. Online Java Compiler It supports multiple JDK versions and different compiler switches. Give it a go!
-
Group:
Members
-
Posts:
70
-
Joined:
11-December 08
Dream Kudos: 0
Posted 11 May 2009 - 08:52 AM
Jubb, on 7 May, 2009 - 11:57 AM, said:
WolfCoder, on 7 May, 2009 - 09:36 AM, said:
This is certainly a bizarre request. It's faster if you just download the JDK again and then javac your code. You don't want someone giving you a viral .class file anyway.
javac AoT.java;
java AoT;
Are the commands.
Actually, for JUST such occasions there is this. Online Java Compiler It supports multiple JDK versions and different compiler switches. Give it a go!
DUDE!!!!! THANK YOU!!!! that is just what i needed. Y has no one told me
-
Group:
Members
-
Posts:
70
-
Joined:
11-December 08
Dream Kudos: 0
Posted 11 May 2009 - 09:09 AM
WolfCoder, on 7 May, 2009 - 09:36 AM, said:
This is certainly a bizarre request. It's faster if you just download the JDK again and then javac your code. You don't want someone giving you a viral .class file anyway.
javac AoT.java;
java AoT;
Are the commands.
ok i need one for my laptop anyway so you know where i can get a JDK
Posted 11 May 2009 - 02:11 PM
-
Group:
Members
-
Posts:
70
-
Joined:
11-December 08
Dream Kudos: 0
Posted 12 May 2009 - 08:35 AM
computerfox, on 11 May, 2009 - 02:11 PM, said:
which one would you recamend?
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
|
Be Social
Programming
Web Development
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|