Please help problem with GUI

Hi
I have two problems firstly when i try to assign a method to a button to a GUI
     JButton SetPrice = new JButton ("Set Price");
        contentPane.add( SetPrice);
         SetPrice.addActionListener(new ActionListener() {
                               public void actionPerformed(ActionEvent e) {  SetPrice ();    }This is teh code i am using to set up teh button on teh display.Belwo is the method it should run.
public double SetPrice( int price)
         if (price <= 199.9){
       Cost= price;
         return Cost;
        else {
          System.out.println ( "Set a price which is less than 199.9");
          return Cost; }
        }When i try to compile it comes up with when i comipile
SetPrice (int) in Shop cannot be applied to ()The variable has type double.So pelase my someone show me how to make the action listener button run this method.
Thanks

JButton SetPrice = new JButton ("Set Price");
        contentPane.add( SetPrice);
         SetPrice.addActionListener(this);
SetPrice.setActionCommand("setprice");
public void actionPerformed(ActionEvent e) {
String action=e.getActionCommand();
if(action.equals("setprice") {
//do something
    }

Similar Messages

  • Premiere Pro CS5: please help problem with importing a file error output "there was an error decompressing audio or video"

    please help problem with importing a file error output "there was an error decompressing audio or video"

    this is related to what adobe program/version?

  • Please help - problems with iPod Nano

    I saw a page in my Popular Science magazine and it had iPod Linux. So I went to the website installed it, and it worked!!! But the problem is , is that when I plug it in to my computer, it charges but won't show up as a drive. Please help!!!!!!!!!!!!!

    Even within the iPod Linux Project the Fifth Generation iPod and the Nano are unsupported hardware so you are pretty much on you own, however check these links out:
    iPod Linux Unsupported - What if Something Goes Wrong
    iPod Linux Project- My iPod is really messed up, how can I fix it?

  • Please Help-Problem with Optical Drive, it's a Mystery...

    Well I'm a fairly big Imogen Heap fan, and her new CD came out the 25th. So I went to Best Buy and I bought the deluxe version which includes a seperate disc with instrumentals. I got home, put it in, and my Mac made a "scratching" kind of noise, then it spit out the disc. I figured there was a problem with it, I went back to Best Buy, got a new one, and it did the exact same thing.
    HOWEVER, both of the instrumental discs worked just fine, and imported just fine. The normal audio disc also works on my Ubuntu computer, Windows computer, and my other Early 2009 Macbook Pro. I also restarted my Mac, cleaned the disc, and that did nothing.
    So, what's the problem do you think?
    (Also I went to Apple but there were no appointments available, and they were too busy to just look at it without an appointment )

    Hi Mate,
    I didn't do an OS install, I took it to an apple store and made a Genius Bar appointemnt. Explained the proble and after 15min conversation, they diagnosed it as teh following;
    The felt/rubber where you put the CD/DVD had gone hard and the friction is causing the CD/DVD to get stuck and be loaded. They tried to tell me that I need to replace the top case  (£140+VAT) as its in-built into it or I can use a £3 spudger to push the CD's in......needles to say the Spudger works fine.....Shame I wasted £100 on the new optical drive ;o( Maybe sell teh spare on eBay....Happy days!

  • Please help - Problem with loading swf's (running very slowly)

    Hi
    I have posted this problem up in the last few days so I built a quick demo of my problem. Can somebody please download it and take a look at it and see what I'm doing wrong?
    You can download it here at:
    http://www.bounceworld.ie/download/Demo_Test.zip
    The external swf's when loaded.....run very very slow; sometimes unresponsive as if there is a script running in the background. I'm using keyboard commands to navigate through the screens - eg:
    on (keyPress "<Space>") {
    gotoAndStop("scene02", "firstframeLabel");
    Thank you for your help!!!!

    Hi
    I'm trying to use Key Listeners to solve my problem.
    I don't know much about key liseners so can somebody help me out.
    I have the following on a keyframe yet it still wont jump to the certain frames when I press the relevent keys. Am I missing something?
    stop();
    KeyListener = new Object();
    KeyListener.onKeyDown = function() {
    if (Key.getAscii() == 38) {  // UP key
    gotoAndStop(89);}
    if (Key.getAscii() == 40) {  // DOWN key
    gotoAndStop(91);}
    if (Key.getAscii() == 37)  // LEFT key
    gotoAndStop(88);}
    if (Key.getAscii() == 32) {  // SPACEBAR key
    loadMovie("application_01.swf", "container");}

  • Please Help: problems with 2nd internal SATA drive on G5

    Hello everyone,
    I was transferring and deleting very large files from my main drive, a 2nd 250GB SATA internal drive, and an external 250GB FW800 drive recently (about 50GB worth of data transfered), and decided to run disk warrior and repair my permissions/verify disk in disk utilities once completed.
    Everything seemed fine until I verified my 2nd internal drive upon which I received the following error: "First Aid Failed" citing "Invalid node structure" and that the volume needs to be repaired. I attempted to Repair disk, though the process stops and I get the same error "Volume could not be repaired because of an error."
    This 2nd SATA drive only holds data (I'm a musician so it only holds sample data for streaming in Logic) but it contains allot of information (185GB used of 233GB) which according to my math comes out to about 80% used. This should be acceptable amount, correct? The drive also has Journaling enabled, though I'm not sure if its relevant or not.
    What should I do? The drive itself seems to be working fine, but why would disk utility have a problem reading/repairing it if its indeed fine. Should I be worried? The drive is probably no more than 2 years old, so it cant be drive failure yet, can it?
    Thanks in advance for any help you can provide!
    Update: I tried to graph the problem drive again in diskwarrior, and this time an error occurred! This obviously did not happen the first time I used diskwarrior to graph and build a new directory, so something must have happened recently. What could have happened? What should I do?
    Message was edited by: Jonathan Timpe

    This 2nd SATA drive only holds data (I'm a musician
    so it only holds sample data for streaming in Logic)
    but it contains allot of information (185GB used of
    233GB) which according to my math comes out to about
    80% used. This should be acceptable amount, correct?
    Yes, that's fine.
    The drive also has Journaling enabled, though I'm not
    sure if its relevant or not.
    Hmm, I think I once had a drive with a directory problem that couldn't be fixed with DiskWarrior without journaling being (temporarily) disabled. After disabling journaling, I used DiskWarrior to Rebuild the drive's directory, then I reenabled journaling.
    What should I do? The drive itself seems to be
    working fine, but why would disk utility have a
    problem reading/repairing it if its indeed fine.
    Should I be worried? The drive is probably no more
    than 2 years old, so it cant be drive failure yet,
    can it?
    I'm afraid it could be, I've had drives fail at any time between half a year after purchase up to 3 or more years after. Though often one hears the drive "die", or notices very slow performance due to bad blocks being weeded out, and the S.M.A.R.T. status - visible in Disk Utility (only for internal drives) in the bottom right, when you select a drive (not volume) is an indicator of a harddisk's health as well (though not the most complete, see this hint, or S.M.A.R.T. Guard).
    Update: I tried to graph the problem drive again in
    diskwarrior, and this time an error occurred! This
    obviously did not happen the first time I used
    diskwarrior to graph and build a new directory, so
    something must have happened recently.
    Did you try to repair anything with Disk Utility in the meantime?
    What could
    have happened? What should I do?
    So did the Repair with DiskWarrior not finish? What kind of error was it?
    In my experience, DiskWarrior mostly fixed any directory trouble. For more serious cases, see this thread.

  • Please help: problems with tutorial 'building advanced portals'

    hi there,
    i'm an absolute newbie with oracle portal and trying to work through the tutorials. a lot of questions arise...
    like this one:
    i've created a multi-tabbed region (chapter 3.4) and added a chart to each tab. So now i have a tab-bar on top-navigation-level and a tab-bar in this region. but they don't look the same and i can't find out, where to manipulate the style of the sublevel-region-tab.
    Can someone help, please?
    thank you very much
    Ralf Schmitt

    Ralf
    When you click on 'Edit Page' (top right hand corner) you should be able to edit both sets of tabs there and each individual tab properties.
    Darren

  • PLEASE HELP - Problem with 2 column fixed template in Dreamweaver CS3

    I am trying to create a website using the 2 column fixed, right sidebar, header and footer html template in Dreamweaver CS3.  I tried putting a picture in the right side bar as well as with in the main content or left portion of the page, and neither picture is showing up when I view it in any of the browsers I'm using.
    I've made some minor changes in colors and sizing, but other than that no other changes.  The pic I put in for the header is showing up just fine though.
    Any help or advice to solve this issue would be greatly appreciated.
    Thanks!!

    Here is the base Dreamweaver code including the pic references that I'm trying to show on either side - when the browser opens, it only shows a blank space where the pics should be... let me know what you think.  Thanks!!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/AL TemplateNEW.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Temp Home</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <style type="text/css">
    <!--
    body  {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background: #666666;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    .twoColFixRtHdr #container {
    width: 780px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
    background: #FFFFFF;
    margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
    border: 1px solid #000000;
    text-align: left; /* this overrides the text-align: center on the body element. */
    .twoColFixRtHdr #header {
    background: #DDDDDD;
    padding: 0 10px 0 20px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
    .twoColFixRtHdr #header h1 {
    margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
    padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    .twoColFixRtHdr #sidebar1 {
    float: right; /* since this element is floated, a width must be given */
    width: 200px; /* the actual width of this div, in standards-compliant browsers, or standards mode in Internet Explorer will include the padding and border in addition to the width */
    background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
    padding: 15px 10px;
    .twoColFixRtHdr #mainContent {
    margin: 0 250px 0 0; /* the right margin on this div element creates the column down the right side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
    padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
    .twoColFixRtHdr #footer {
    padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
    background:#DDDDDD;
    .twoColFixRtHdr #footer p {
    margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page */
    float: left;
    margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
    clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    -->
    </style><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 220px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]--></head>
    <body class="twoColFixRtHdr">
    <div id="container">
      <div id="header">
        <h1>Header</h1>
      <!-- end #header --></div>
      <div id="sidebar1">
        <h3>Sidebar1 Content</h3>
        <!-- InstanceBeginEditable name="RightSideBar" -->
        <p>Right Side Bar Content - - -    </p>
        <p>Inserted pic below here</p>
        <p><img src="/images/Syntergy5.jpg" width="123" height="105" /></p>
        <p>The background color on this div will only show for the length of the content. If you'd like a dividing line instead, place a border on the right side of the #mainContent div if it will always contain more content. </p>
        <p>Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend  sollicitudin, molestie id, varius et, nibh. Donec nec libero.</p>
    <!-- InstanceEndEditable -->
        <p> </p>
      <!-- end #sidebar1 --></div>
      <div id="mainContent">
        <h1> Main Content </h1>
        <!-- InstanceBeginEditable name="MainContent" -->
        <p>Main Content - - </p>
        <p>inserted pic below here:</p>
        <p><img src="/images/Kelly1.jpg" width="285" height="236" /></p>
        <p> </p>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at,  odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce  varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id,  libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat  feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut,  sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh.  Donec nec libero. </p>
        <!-- InstanceEndEditable -->
        <p>
          <!-- end #mainContent -->
        </p>
      </div>
    <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />
      <div id="footer">
        <p>Footer</p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    <!-- InstanceEnd --></html>

  • Please Help: Problems with erratic mouse

    I am running Snow Leopard 10.6.7 and just recently started experience erratic behaviour from my magic mouse. I have read countless forums that document this issue - its a known thing. It honestly drove me insane to the point that I completely formatted my 27" iMac and got back up to 10.6.7 - after installing the magic mouse software again, the SAME behaviour happened. I tried changing the channels at which my airport extreme broadcasts my wireless signal throughout the house - no luck.
    I even switched over to my wired keyboard and Mighty Mouse - and you wouldn't believe it, but I am also experience this subtle jerkiness with the mouse - the cursor will get laggy when dragging from side to side, or up and down - definitely noticeable since I have been using mac's for 6 years now. I am absolutely blown away by this sudden phenomenon and have no explanation for it. My desk surface is fine (since it worked for years before hand). Both lenses on the mice have been blown out by a dust blower, they are clean.
    I am about to lose my mind. Any ideas?

    I am having the same problem. It started about 2 weeks ago and it drives my completely nuts. Even my wired mouse does have a noticeable lag. I use a lot of Photoshop and jerkiness is very annoying and it slows me down.
    Anybody has an idea why this is happening?

  • Please help, problems with two different ipods

    Both my ipod and my sister's ipod are experiencing problems. Both ipod's are 4th gen with click wheel.
    My ipod isn't being recognized by itunes (I have the latest version) and only once in awhile will my computer recognize my ipod. I get a file showing my calender, notes, etc,.. I can't click on any of them though. When I connect my ipod to the usb cord and connect the cord to the computer, the ipod only just restart's itself.
    My sister's ipod does absolutely nothing except show the apple logo and then shut off. Earlier today it was displaying the exclamation mark and the folder icon and it once displayed the sad ipod icon.
    Does anyone here know what the problem is with these two ipod's and if there is a way that I can fix them?

    See these troubleshooting articles.
    My iPod is sad.
    iPod displays a "sad iPod" icon.
    What does this picture on my iPod mean?
    Also, there is a pretty comprehensive post written by another forum member which is about the sad iPod icon or the folder and ! icon. Be aware that it's quite involved and contains some info that will almost certainly void the warranty. If your iPod is still within the warranty period, you should use that option first.
    The Sad iPod/folder and ! icon.
    You can arrange online service here.
    Service request.

  • HT201240 PLEASE HELP PROBLEMS WITH MY MAX OSX 10.5.8

    Does anyone know how many chaaracter my mac password can be up to ? I forgot my password and my trackpad and mouse is broken so I can't use Command S to make a new one and I'm just trying to figure out what the password requirements were in 2010? any help would be much appreciated I have another macbook but I would really like to get the other one up and running again as a desktop with a mouse and keyboard. Thanks.

    edit: trackpad and keyboard don't work it took a fall two years ago when my girlfriend dropped it I can only start it using the s key after power up and after it turns on the keyboard and trackpad do not function.

  • Please HELP / problem with Mac to PC migration

    Good afternoon,
    I have a 1TB WD mybook external HD to which I would like to copy large files like movies, music and pictures from my Mac and then connect it to my wife's PC and place it on her internal HD. With the HD being formated on my mac, I'm unable to migrate the files to her PC. I was wondering how to format the drive so that it would be able to read/write on both the Mac and PC. I have looked for answers on this discussion but I didn't find anything that applies directly to me.
    Much thanks in advance for your help

    Hi, heres a link:-
    http://forums.cnet.com/5208-6126_102-0.html?threadID=212870
    ...L

  • Please Help, problem with CCPS install

    Hello,
    I installed the CC app, then chose to install the CCPS from the app list, - it stops installing at 30% and I do not know why? nor how to fix it. I want to open my NEF files from my D610 and my CS5 wont open the NEF fles - so i brought the 12 month CC for $19.99 per month - and now can not install anything... HELP - WHAT AM I DOING WRONG?

    Try following steps:
    Close CC App and launch the application again.
    After launch, click Install next to PS CC.
    Regards,
    Ashutosh

  • PLEASE HELP-problem with downloaded files!

    I have downloaded some games and stuff from the internet to my new iMac(Leopard10.5.1). I open the files, copy to applications, or install from the folder-and that should be it, right?? Unfortunately, this is not so! I have to go through this same process every time I want to use one of my downloads. I have to re-enter serial numbers and all that stuff EVERY TIME!!! Why is this happening? I don't understand...

    No, it's the computer. The files are fine, the computer just doesn't seem to keep the info once I install. Never had this issue with any of my previous macs.

  • Help problems with gui

    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import javax.swing.*;
    public class TheBEST extends Frame implements ItemListener
    TextField AmmountLabel;
    Label lb1,lb2,lb3,lb4,lb5;
    Label tb6,tb7;
    Label td8,td9,td10,td11,td12;
    Label ct1;
    Label ct2;
    Label ct3;
    Panel p1,p2,p3,p4,p5,p6,p7,p8,p9;
    private Checkbox  StirJcheck,AbcJcheck,OysterJcheck,OldJcheck,ThaiJcheck;
    private double PackagePric = 58.00;
    private final double StirFriedCheck=2.00;
    private final double AbcMango=3.00;
    private final double OystersMombasa=5.50;
    private final double Oldfashioned=2.50;
    private final double Thaihot=4.50;
    public static void main(String[]args){
    TheBEST f=new TheBEST();
    f.setSize(400,200);
    f.setTitle("Restaurant");
    f.setVisible(true);
    public TheBEST()
    Font fV = new Font("Verdana", Font.BOLD,25);
    Font fA = new Font("Ariel",Font.BOLD+Font.ITALIC,13);
    setBackground(Color.pink);
    lb1=new Label("SHAZALEE BISTRO");
    lb1.setFont(fV);
    lb1.setForeground(new Color(255,0,230));
    lb1.setBackground(Color.pink);
    lb2=new Label("Special Package For Today !!");
    lb2.setFont(fA);
    lb3=new Label("Tomyam : (Chicken+Meat+Crab+Fish)");
    lb3.setBackground(Color.orange);
    lb3.setForeground(Color.red);
    lb3.setFont(fA);
    lb4=new Label("Salad Relish with Thousand Island");
    lb4.setBackground(Color.orange);
    lb4.setForeground(Color.red);
    lb4.setFont(fA);
    lb5=new Label("Thai Spicy Tamarind Prawn");
    lb5.setBackground(Color.orange);
    lb5.setForeground(Color.red);
    lb5.setFont(fA);
    tb6 =new Label(" << Additional Order:  >>");
    tb6.setFont(fA);
    tb7 =new Label("Number of person : ");
       tb7.setFont(fA);
       ct1 =new Label("$0.00       ");
       ct2 =new Label("$0.00       ");
       ct3=new Label("58.00");
       AmmountLabel = new TextField(4);
    p1.setLayout(new BorderLayout());
    p1.add("NORTH",lb1);
    p1.add("CENTER",p2);
    p1.add("SOUTH",p8);
    /*p1.add(lb2);
    p1.add(lb3);
    p1.add(lb4);
    p1.add(lb5);
    p1.add(tb6);
    /*setLayout(new BorderLayout());
    add("NORTH",p1);
    add("CENTER",p2);
    add("SOUTH",p3);
    p2.setLayout(new BorderLayout());
    p2.add("NORTH",p3);
    p2.add("CENTER",p5);
    p2.add(tb7);
    p2.add(AmmountLabel);
       p2.setBackground(Color.pink);
    setLayout(new FlowLayout());
    add(p2);
    StirJcheck = new Checkbox("Stir Fried Wide Rice : RM 2.00 per person",false);
    AbcJcheck = new Checkbox("ABC plus Mango Ice Cream with Pistachios : RM 3.00 per person",false);
    OysterJcheck = new Checkbox("Oysters Mombasa : Baked with Garlic Butter:RM 5.00 per person" ,false);
    OldJcheck= new Checkbox("Old Fashioned Banana Pudding : RM 2.50 per person",false);
       ThaiJcheck= new Checkbox("Thai Hot and Sour Shrimp Soup : RM 4.50 per person",false);
    p3.setLayout(new BorderLayout());
    p3.add("NORTH",lb2);
    p3.add("CENTER",p4);
    p3.add("NORTH",tb6);
    p3.setForeground(Color.red);
    p3.setFont(fA);
    p3.add(StirJcheck);
    p3.add(AbcJcheck );
    p3.add(OysterJcheck);
    p3.add(OldJcheck);
    p3.add(ThaiJcheck);
    /*setLayout(new BorderLayout(20,10));
    add(p3);
    td8 = new Label(" ** PRICE ** ");
    td8.setBackground(Color.gray);
    td9 = new Label("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    td10 = new Label("PACKAGE : ");
    td11 = new Label("ADDITIONAL ORDER :");
    td12 = new Label(" TOTAL PRICE : ");
    p4.setLayout(new GridLayout(3,0,0,10));
    p4.add(lb3);
    p4.add(lb4);
    p4.add(lb5);
    p4.setBackground(Color.yellow);
    p4.setFont(fA);
    p4.add(td8);
    p4.add(td9);
    p4.add(td10);
    p4.add(ct3);
    p4.add(td11);
       p4.add(ct1);
    p4.add(td12);
    p4.add(ct2);
    p4.setBackground(Color.GRAY);
    /*setLayout(new FlowLayout(FlowLayout.LEFT,0,20));
    add(p4);
    p5.setLayout(new BorderLayout());
    p5.add("NORTH",p6);
    p5.add("CENTER",p7);
    p6.setLayout(new FlowLayout());
    p6.add(tb7);
    p6.add(AmmountLabel);
    p7.setLayout(new GridLayout(5,0,0,0));
    p7.add(StirJcheck);
    p7.add(AbcJcheck);
    p7.add(OysterJcheck);
    p7.add(OldJcheck);
    p7.add(ThaiJcheck);
    p8.setLayout(new BorderLayout());
    p8.add("NORTH",td8);
    p8.add("CENTER",p9);
    p9.setLayout(new GridLayout());
    p9.add(td9);
    p9.add(td10);
    p9.add(td11);
    p9.add(td12);
    StirJcheck.addItemListener(this);
    AbcJcheck.addItemListener(this);
    OysterJcheck.addItemListener(this);
    OldJcheck.addItemListener(this);
    ThaiJcheck.addItemListener(this);
    public void itemStateChanged(ItemEvent event) {
      double price =0.00;
    double total=PackagePric + price;
    NumberFormat nf = NumberFormat.getCurrencyInstance();
    int addAmount = Integer.parseInt(AmmountLabel.getText());
      if (StirJcheck.getState()) {
      price+= StirFriedCheck * addAmount;
      if (AbcJcheck.getState()) {
      price+= AbcMango* addAmount;
       if (OysterJcheck.getState()) {
      price+= OystersMombasa * addAmount;
      if (OldJcheck.getState()) {
      price+= Oldfashioned * addAmount;
      if (ThaiJcheck.getState()) {
      price+= Thaihot * addAmount;
       ct1.setText(nf.format(price));
       ct2.setText(nf.format(total));
       ct3.setText(nf.format(PackagePric));
    }I get a runtime error what should i do ?

    [url http://forum.java.sun.com/thread.jspa?threadID=770922&tstart=0]Crosspost.

Maybe you are looking for