School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
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!



please compile mine is down

please compile mine is down Rate Topic: -----

#1 saulfenky2470  Icon User is offline

  • D.I.C Head
  • PipPip
  • 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? :blink:

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);

		}
	}
		
	

}


Was This Post Helpful? 0
  • +
  • -


#2 WolfCoder  Icon User is offline

  • Also a resident Witch. Yes, really.
  • Icon
  • View blog
  • Group: Expert w/DIC++
  • Posts: 5,689
  • Joined: 05-May 05


Dream Kudos: 1625

Expert In: ゲームのプログラム、かわいい

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

Was This Post Helpful? 0
  • +
  • -

#4 Jubb  Icon User is offline

  • D.I.C Head
  • PipPip
  • Group: Members
  • Posts: 84
  • Joined: 06-May 09


Dream Kudos: 0

Posted 07 May 2009 - 11:57 AM

View PostWolfCoder, 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!
Was This Post Helpful? 1
  • +
  • -

#5 saulfenky2470  Icon User is offline

  • D.I.C Head
  • PipPip
  • Group: Members
  • Posts: 70
  • Joined: 11-December 08


Dream Kudos: 0

Posted 11 May 2009 - 08:52 AM

View PostJubb, on 7 May, 2009 - 11:57 AM, said:

View PostWolfCoder, 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
Was This Post Helpful? 0
  • +
  • -

#6 saulfenky2470  Icon User is offline

  • D.I.C Head
  • PipPip
  • Group: Members
  • Posts: 70
  • Joined: 11-December 08


Dream Kudos: 0

Posted 11 May 2009 - 09:09 AM

View PostWolfCoder, 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
Was This Post Helpful? 0
  • +
  • -

#7 computerfox  Icon User is offline

  • straight vegetarian kid
  • PipPipPipPipPip
  • View blog
  • Group: Members
  • Posts: 3,772
  • Joined: 29-January 09


Dream Kudos: 1700

Posted 11 May 2009 - 02:11 PM

hope this helps...
Was This Post Helpful? 0
  • +
  • -

#8 saulfenky2470  Icon User is offline

  • D.I.C Head
  • PipPip
  • Group: Members
  • Posts: 70
  • Joined: 11-December 08


Dream Kudos: 0

Posted 12 May 2009 - 08:35 AM

View Postcomputerfox, on 11 May, 2009 - 02:11 PM, said:


which one would you recamend?
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month