This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes compiled but not running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "compiled but not running" Watch "compiled but not running" New topic
Author

compiled but not running

jide agboola
Greenhorn

Joined: Nov 11, 2006
Posts: 9
I have just written this code for calculating the perimeter and area of Rectangle, i was able to compile it but still couldn't run it, could anyone please help me have a look at it.


When you are going through Hell, you keep going<br /> <br /> Winston Churchill.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

What happens when you run it? What should it do that it is not doing? Are there runtime errors? A stacktrace perhaps?


GenRocket - Experts at Building Test Data
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
these go together
public class periArea extends JFrame {
Container pane = getContentPane();
pane.add(row1);
pane.add(row2);
pane.add(row3);


and these go together
JFrame frame;
frame.setTitle("Area and Perimeter");
frame.setSize(400,400);
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame.setVisible(true);

the two are not the same JFrame - you should be able to work out the fix.

when fixed, your next question will be "only row3 shows" - JFrame's default
LayoutManager is BorderLayout - read the apidocs for BorderLayout to see how
multiple components should be added.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compiled but not running
 
Similar Threads
Very Very New
help I am having trouble getting the field to fill in
help... I need a feild to fill in
help I am having trouble getting the field to fill in
Please rescue me out