uhm, but i want the thing to be printed as a label.
Type: Posts; User: xdorkiee
uhm, but i want the thing to be printed as a label.
can you use println's for JLabels? I thought println's are only for system.in.println
thank you i got it. one last problem.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class HedgeYourBet extends JFrame
{
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class HedgeYourBet extends JFrame
{
public static void main (String[] arg)
{
HedgeYourBet window = new...
thank you!
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class HedgeYourBet extends JFrame
{
the program is little a mini quiz.
i put the questions as strings, q1,q2,q3 so when i click submit, the label will change from q1, to q2.
The answer choices are not going to chance.
However,...
helloo! i am back with another program!
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class HedgeYourBet extends JFrame
{
i got it to work thank you
what does
--------------------Configuration: <Default>--------------------
Note: K:\CompSci\Projects\JPizza.java uses unchecked or unsafe operations.
Note:...
if i use int() sizeCost = (SMALL,MEDIUM,LARGE,XLARGE);
errors;
--------------------Configuration: <Default>--------------------
K:\CompSci\Projects\JPizza.java:46: error: not a...
public final int SMALL = 7;
public final int MEDIUM = 9;
public final int LARGE = 11;
public final int XLARGE = 14;
int[] sizeCost = {SMALL,MEDIUM,LARGE,XLARGE};
error
--------------------Configuration: <Default>--------------------
K:\CompSci\Projects\JPizza.java:65: error: cannot find symbol
cost = sizeCost(sizeChoice);
^...
the only place where i put sizeCost is
int[] sizeCost = {SMALL,MEDIUM,LARGE,XLARGE};
and
cost = sizeCost(sizeChoice);
it still cannot find sizeCost
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JPizza extends JFrame
{
sorry i have no idea how to define sizeCost and correlate it with my final ints.
would it be somewhere along the lines of
int sizeCost = {SMALL,MEDIUM,LARGE,XLARGE};
import...
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JPizza extends JFrame
{
public static void main (String[] arg)
{
JPizza window = new JPizza();
yes thank you i got it to work, but now i have trouble with another program.
how do i add the cost of the pizza's size into my output?
***********Description - this program uses...
public class ClickButtonListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
Object o = e.getSource();
if(o==aspen)
{
...
wow i can't believe i missed that ><
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JMyNewHome extends JFrame
{
ahh thanks soo much!!
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JMyNewHome extends JFrame
{
--------------------Configuration: <Default>--------------------
K:\CompSci\Projects\JMyNewHome.java:35: error: ';' expected
Container contentPane = getContentPane();
^...
ok here it is, it looks right BUT I'M STILL GETTING ALOT OF ERRORS ><
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JMyNewHome extends JFrame
{
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JMyNewHome extends JFrame
{
public static void main(String[] arg)
{
JMyNewHome window = new...
I'm using a flow layout for now.
The question I'm having soo much trouble on is how do i get the final price to show up?
Like in the first, it has brittany , 2 bedrooms and no garage selected, and...
here's how i want it to look like
http://i49.tinypic.com/2i8c2gk.png
Sorry.
Okay, i've worked on it and I really have no idea what i'm doing.
I want my output to setText to my grand total.
here's what i have, i know my curlies are really off at the...