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.

Similar Messages

  • 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
        }

  • Problem with GUI in applet

    Hai to all,
    I am having a problem with GUI in applets
    My first class extends a JPanel named A_a
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    both the applets C_c and B_b are in same browser page
    How can i achive that pls help .

    Just to make the code readable...
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    }and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    }and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    }

  • 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?

  • Design Problem with GUI sub vi

    Hello community,
    in general, I would like to separate the GUI from the data, but I get
    a problem with this design approach in LabView:
    I often have sub VIs that are supposed to control something.
    Therefore, these VIs consist of a control loop. A GUI window should
    show the regulation process (showing how the tracking error is
    hopefully approaching zero etc.). As I said, this GUI should be a
    separate VI (separate from the control loop VI). Since the GUI has to
    be updated on each sample, it is clear that the GUI VI should be
    inside the control loop, and therefore, it should be a sub VI of the
    control loop VI.
    Now, the problem is that the control loop VI itsself is a sub VI
    because the whole regulation is just a subsystem of the whole program
    (The main VI doesn't have a GUI, but first starts a (GUI) input mask
    for the same reason: separate the GUI from the rest).
    But back to the GUI VI inside the control loop. I must check the 'Show
    Front Panel When Called' option. But I can't check the 'Close
    Afterwards if Originally Closed' option since the GUI VI would appear
    and disappear in the control loop - according to the loop's sample
    rate. However, if I don't check the 'Close Afterwards if Originally
    Closed' option then the GUI VI will continue to show, even after the
    control process is finished.
    So in other words: I need the possiblity to close the GUI VI
    programatically, after the control process is finished.
    Any ideas?
    Regards
    Johannes

    Hi tmh,
    thanks for your answer
    On Tue, 11 Nov 2003 10:26:32 -0600 (CST), tmh wrote:
    >I think you're on the wrong track trying to put your 'GUI VI' inside
    >your control loop. It might be a better design to have the control and
    >GUI handled by separate loops and use an appropriate method to pass
    >data between the two, e.g. a global variable to pass the setpoint from
    >GUI to control...
    I try to avoid globals. Now, suppose I had multiple unrelated control
    loops. I had to suppose a global variable for each of these
    subsystems. I already use globals for the GPIB device IDs. I wouldn't
    like more.
    >and a queue to pass readings from control to GUI. In
    >fact, you could even split the GUI into two loops: one to read user
    >input from the front pa
    nel controls and one to display data returned
    >by the control loop.
    But if I split the GUI: How can I view them simultaneously? The user
    must see input and output simultaneously, in one window.
    >You may find it's more convenient to make the GUI
    >the top-level VI and make the control loop a subVI of that (but
    >outside the GUI loops).
    Your approach sounds interesting. Is there a sample for this
    architecture in the examples?
    Anyway, I have to point out that I have several unrelated GUI windows
    in my application. There is no notion of a main GUI in my application.
    The control loop is just one feature of my application, so it doesn't
    make sense to use the control GUI as the top-level VI. At application
    startup a user input form is displayed (it also has some sort of menu
    selection). But even this window can't be toplevel since it provides
    an Option radio button (that shows and hides controls, accordingly) a
    CONTINUE button, and a STOP button which implies that the input
    form.vi must be
    in a loop.
    The problem is that I can't send messages to windows in LabView as I
    am used to in Win32/VC++.
    Johannes

  • JDeveloper Problem with GUI

    Hi All,
    I'm running JDev 3.1 on Win2000, and I'm having a bit of a problem with redraws of the GUI.
    When I click anywhere on the JDev GUI and trigger and action that involves a GUI redraw the little piece of the GUI under the mouse pointer graphic is not redrawn. It does not effect the functionality but it is annoying and will make the other developers I work with less keen about using it.
    Does anyone else have this problem? Is it a JDev or Win2k problem?
    Cheers
    d

    Probably an issue with the JRE used by JDev. on Win 2k. Have you tried 3.2x? I haven't seen that type of issue with it on Win 2k.

  • Help starting with GUI

    I am working on programing a program for my department, Meteorology, at school so that I can download images every five minutes. I have a version of this that works in the command line, but I want to add a gui to it now. I am not really sure how to start. I know that I need a drop down box with all of the radar sites and their call numbers, and a radio button so they can select the type of image that the user wants to download. These two parts then make up the URL of the image so I can download it. I tried makeing a gui by making each one of these components a separate class. Basically, I am wondering if I should start off by making the GUI all one class, or if each peice of it should be its own class that then gets tied together in a different part of the program. any help with GUI would be great as I am new to this step of programing having only worked in Java command line and Fortran 77. Thanks
    Neil

    Hi,
    You can create a GUI from within one class. GUIs can be created for applications or applets. The following code is a simple GUI for an application using Swing components. You may need JDK 1.3.1_6.
    To make your GUI functional you would need to add or implement Event Handlers preferably using the delegation model. Each control(buttons, textfield, etc) you need to define the event object(button clicks), the event source(button), and an event handler(understands the event and executes code that processes the event).
    import javax.swing.*;
    public class Customer
    //Variable for frame window
    static JFrame frameObj;
    static JPanel panelObj;
    //Variables of labels
    JLabel labelCustName;
    JLabel labelCustCellNo;
    JLabel labelCustPackage;
    JLabel labelCustAge;
    //Variables for data entry controls
    JTextField textCustName;
    JTextField textCustCellNo;
    JComboBox comboCustPackage;
    JTextField textCustAge;
    public static void main(String args[])
         //Creating the JFrame object
         frameObj = new JFrame("Customer Details Form");
         //Setting the close option
         frameObj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Making the frame visible
         frameObj.setVisible(true);
    frameObj.setSize(300,300);
    Customer customerObj = new Customer();
    public Customer()
         //Add appropriate controls to the frame in the constructor
         //Create panel
         panelObj = new JPanel();
    frameObj.getContentPane().add(panelObj);
    //Setting close option
    frameObj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and add the appropriate controls
    //Initializing labels
    labelCustName = new JLabel("Customer Name: ");
    labelCustCellNo = new JLabel("Cell Number: ");
    labelCustPackage = new JLabel("Package: ");
    labelCustAge = new JLabel("Age: ");
    //Initializing data entry controls
    textCustName = new JTextField(30);
    textCustCellNo = new JTextField(15);
    textCustAge = new JTextField(2);
    String packages[] = {"Executive", "Standard"};
    comboCustPackage = new JComboBox(packages);
    //Adding controls for customer name
    panelObj.add(labelCustName);
    panelObj.add(textCustName);
    //Adding controls for cell number
    panelObj.add(labelCustCellNo);
    panelObj.add(textCustCellNo);
    //Adding controls for Package
    panelObj.add(labelCustPackage);
    panelObj.add(comboCustPackage);
    //Adding controls for customer age
    panelObj.add(labelCustAge);
    panelObj.add(textCustAge);

  • HELP/Problems with pull-down navigator bar

    Hi everyone,
    I was wondering if I could get some input. I have just
    re-designed our magazine's site, www.easternsurf.com
    I used Pop-Up menu function in Fireworks 8 to generate our
    Navigator bar. For the most part everything has been working well,
    BUT we've had a couple of complaints that the navigator bar's
    pull-down menus get stuck behind the photos/banner ads/etc. instead
    of in front of them when viewing in Internet Explorer. I'm on the
    Mac platform (OSX Tiger/Macromedia Studio 8) and have seen no
    problems viewing in Safari, Firefox and Netscape. The only
    complaints have come from Internet Explorer users. A couple of
    people updated their browser to the newest version and the problem
    disappeared, however we've still had a couple of people that have
    written in that the newest version of IE is still not displaying
    properly.
    Also we've got a strip of button ads running down the left
    hand side of each page and I've also seen another issue that's
    common on sites of this type...when the pulldown menu overlaps with
    a Flash element, there is a problem with the screen re-draw. I've
    seen this on several other sites and know it's a common problem,
    but does anyone know of a workaround where this won't happen? I
    just noticed that signing on to Adobe's site, there almost seems to
    be a command where the menu keeps re-drawing at a very rapid rate
    so this won't happen.
    Any input would be greatly appreciated, although I'm Mac all
    the way, we are a business and have to get this site visible for
    everyone!
    Thanks

    Hi Oldbudge,
    Welcome to the Community,
    Please Perform a Battery Pull Restart like this While Device is Powered On remove the Battery wait for a min. then re-insert it back wait till the device take a long Reboot.And see if that helps.
    Good Luck
    Prince
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • Help - problem with white iphone 4 speaker

    Hi, i have a problem with my white iphone 4 speaker. I know the specs stated that the mic is supposed to be on the left and the right is the speaker but i've compared at least 2 other black iphones 4s and there is some volume from the left side (if you close the right side) whereas mine is practically non-existent. Should i be concerned? Is this specific to the white iphone 4? The local telco has not been helpful - they can only reformat the phone and said that this is a software problem. Anyone with similar experience pls share. Thanks in advance.

    irene sim wrote:
    Hi, i have a problem with my white iphone 4 speaker. I know the specs stated that the mic is supposed to be on the left and the right is the speaker but i've compared at least 2 other black iphones 4s and there is some volume from the left side (if you close the right side) whereas mine is practically non-existent. Should i be concerned? Is this specific to the white iphone 4? The local telco has not been helpful - they can only reformat the phone and said that this is a software problem. Anyone with similar experience pls share. Thanks in advance.
    You already know the answer.  ALL iphones, every single one of them, have but one speaker at the bottom.  You have NO ISSUE at all with your speakers.  None.  Nothing is wrong.  At all.  No problem.  None.

  • BEx Analyzer 3.x language problem with GUI 710

    Hi All,
    We are having trouble to login to BEx Analyzer 3.x with GUI 710 with English language, even if we set language as EN in the logon pad by default it is logging into Japanese language. But 7.x Analyser is working fine.
    We have BI 7.0 and BW 3.5 systems. 
    SAP GUI 710 installed with latest available Frontend Patch ( bi710sp10_1000-10004472 , gui710_15-10002995 and bw350gui710_7-10004473 ) and we are using Excel 2003 on XP Professional.
    Installed .Net Framework 2.0, Microsoft office patch - office2003-KB907417
    Your help is very much appreciated.
    Regards,
    MKR

    Hi,
    Are you using different backend systems to connect for 3.x and 7.x? Because the file which prompts the SAP Logon is a common file used by both 3.x and 7.x.It shouldn't behave differently for the same system.
    You can uninstall the SAPGui and Front End patch and then reinstall it.
    The BW 3.5  patch  8  in SAP GUI 7.10 is released to the SMP now and is available for download.
    Rgds,
    Murali

  • Pleaseeeeeee Help - Problems with position of my web page

    Hi, first sorry on my english
    I have problem with position of my page. I had made my web page in Indesign CS5 and exported to swf file. My web page is working fine (www.igor-flytying.com) but the page is not in the middle of the web browser. How can I fix the problem????? I am a beginer in Indesign. I had try to make some changes in html file (salign) but still nothing.
    Please HELLLLLPPPPPP
    Regards
    Aljosa

    Petteri, SWFObject is much better because it loads the JavaScript so you don't see it inside the HTML page, but it still wraps the swf in a div which by default will be positioned in the upperleft of the browser window.
    This is the only way I've been able to center using SWFObject—note that it's the "flashcontent" div style that does the centering not the align embed parameter:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>S W F | Centered</title>
    <meta http-equiv="Content-Type" content="text/html" />
    <!-- Centers the swf on the page. Note: width and height need to match the swf and margin left and right are -.50%-->
    <style type="text/css">
              #flashcontent {width: 1000px; height: 750px; margin-left: -500px; margin-top: -375px; position: absolute; left: 50%; top: 50%;}
    </style>
              <script type="text/javascript" src="swfobject.js"></script>
              <script type="text/javascript">
                        var flashvars = {};
                        flashvars.myFlashVar = "Testing";
                        var params = {}; //Embed parameters: http://kb2.adobe.com/cps/127/tn_12701.html
                        params.quality = "best";
                        params.align="t"
                        //SWFObject parameters: http://code.google.com/p/swfobject/wiki/api
                        swfobject.embedSWF("swftest.swf", "flashcontent", "1000", "750", "10.0", false, flashvars, params);
              </script>
    </head>
    <!-- ALT HTML TEXT-->
    <body style="background-color: #888888">
              <div id="flashcontent">
                        <a href="http://www.adobe.com/go/getflashplayer"><img src="getFlash.gif"  alt="adobe icon" border="0" /></a>
              </div>
    </body>
    </html>

  • Help - Problem with word documents

    Hi
    All of a sudden I am having problems with documents in my word application.  Files I have previously transderred on to my Mac from a memory stick or via email attachments are unable to be altered.  i cannot add to a downloaded document that needs to be filled in or alter a date on a letter that I send out each month.  I am not very compiter literate.
    Beryl

    Hi
    All of a sudden I am having problems with documents in my word application.  Files I have previously transderred on to my Mac from a memory stick or via email attachments are unable to be altered.  i cannot add to a downloaded document that needs to be filled in or alter a date on a letter that I send out each month.  I am not very compiter literate.
    Beryl

  • 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!

  • More help needed with GUI

    When running the code below,
    I get this error;
    Exception in thread "main" java.lang.IllegalArgumentException: adding a window to a container
         at java.awt.Container.addImpl(Container.java:1022)
         at java.awt.Container.add(Container.java:352)
         at ExamScore.main(ExamScore.java:253)
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.:
    If I compile it I get no erros.
    Can someone please help me, will be much appreciated.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.text.*;
    import com.jgoodies.forms.layout.*;
    class ExamScore extends JFrame {
    //public static void main(String[] args) {                    
    // ExamScore window = new ExamScore();
    // window.setVisible(true);
         public ExamScore()
              // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
              // Generated using JFormDesigner Evaluation license - James Petidis
              ExamScores = new JPanel();
              lblHeading = new JLabel();
              btnEnterGrades = new JButton();
              btnReset = new JButton();
              btnAbout = new JButton();
              lblGradeA = new JLabel();
              txtTotalNumberA = new JTextField();
              txtPercentageA = new JTextField();
              lblGradeB = new JLabel();
              txtTotalNumberB = new JTextField();
              txtPercentageB = new JTextField();
              lblGradeC = new JLabel();
              txtTotalNumberC = new JTextField();
              txtPercentageC = new JTextField();
              lblGradeD = new JLabel();
              txtTotalNumberD = new JTextField();
              txtPercentageD = new JTextField();
              lblGradeF = new JLabel();
              txtTotalNumberF = new JTextField();
              txtPercentageF = new JTextField();
              lblTotalScores = new JLabel();
              txtTotalScores = new JTextField();
              lblMaxScore = new JLabel();
              txtMaxScore = new JTextField();
              lblMinScore = new JLabel();
              txtMinScore = new JTextField();
              lblAvgScore = new JLabel();
              txtAverageScore = new JTextField();
              CellConstraints cc = new CellConstraints();
              //======== ExamScores ========
                   ExamScores.setBackground(new Color(255, 255, 204));
                   // JFormDesigner evaluation mark
                   ExamScores.setBorder(new javax.swing.border.CompoundBorder(
                        new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                             "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                             javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12),
                             java.awt.Color.red), ExamScores.getBorder())); ExamScores.addPropertyChangeListener(new java.beans.PropertyChangeListener(){public void propertyChange(java.beans.PropertyChangeEvent e){if("border".equals(e.getPropertyName()))throw new RuntimeException();}});
                   ExamScores.setLayout(new FormLayout(
                        "3*(default, $lcgap), 43dlu, 2*($lcgap, default), 2*($lcgap, 57dlu), 2*(default, $lcgap), 2*($lcgap, default)",
                        "13*(default, $lgap), 16dlu, $lgap, default"));
                   //---- lblHeading ----
                   lblHeading.setText(" Exam Score Reader");
                   lblHeading.setFont(new Font("Tahoma", Font.PLAIN, 24));
                   ExamScores.add(lblHeading, cc.xywh(9, 1, 5, 1));
                   //---- btnEnterGrades ----
                   btnEnterGrades.setText("Enter Grades");
                   ExamScores.add(btnEnterGrades, cc.xy(9, 5));
                   //---- btnReset ----
                   btnReset.setText("Reset");
                   ExamScores.add(btnReset, cc.xy(11, 5));
                   //---- btnAbout ----
                   btnAbout.setText("About");
                   ExamScores.add(btnAbout, cc.xy(13, 5));
                   //---- lblGradeA ----
                   lblGradeA.setText("Total Number / Percentage Of A's = ");
                   ExamScores.add(lblGradeA, cc.xy(9, 11));
                   //---- txtTotalNumberA ----
                   txtTotalNumberA.setEditable(false);
                   txtTotalNumberA.setEnabled(false);
                   ExamScores.add(txtTotalNumberA, cc.xy(11, 11));
                   //---- txtPercentageA ----
                   txtPercentageA.setEnabled(false);
                   txtPercentageA.setEditable(false);
                   ExamScores.add(txtPercentageA, cc.xy(13, 11));
                   //---- lblGradeB ----
                   lblGradeB.setText("Total Number / Percentage Of B's = ");
                   ExamScores.add(lblGradeB, cc.xy(9, 13));
                   //---- txtTotalNumberB ----
                   txtTotalNumberB.setEnabled(false);
                   txtTotalNumberB.setEditable(false);
                   ExamScores.add(txtTotalNumberB, cc.xy(11, 13));
                   //---- txtPercentageB ----
                   txtPercentageB.setEnabled(false);
                   txtPercentageB.setEditable(false);
                   ExamScores.add(txtPercentageB, cc.xy(13, 13));
                   //---- lblGradeC ----
                   lblGradeC.setText("Total Number / Percentage Of C's = ");
                   ExamScores.add(lblGradeC, cc.xy(9, 15));
                   //---- txtTotalNumberC ----
                   txtTotalNumberC.setEnabled(false);
                   ExamScores.add(txtTotalNumberC, cc.xy(11, 15));
                   //---- txtPercentageC ----
                   txtPercentageC.setEnabled(false);
                   txtPercentageC.setEditable(false);
                   ExamScores.add(txtPercentageC, cc.xy(13, 15));
                   //---- lblGradeD ----
                   lblGradeD.setText("Total Number / Percentage Of D's = ");
                   ExamScores.add(lblGradeD, cc.xy(9, 17));
                   //---- txtTotalNumberD ----
                   txtTotalNumberD.setEnabled(false);
                   txtTotalNumberD.setEditable(false);
                   ExamScores.add(txtTotalNumberD, cc.xy(11, 17));
                   //---- txtPercentageD ----
                   txtPercentageD.setEnabled(false);
                   txtPercentageD.setEditable(false);
                   ExamScores.add(txtPercentageD, cc.xy(13, 17));
                   //---- lblGradeF ----
                   lblGradeF.setText("Total Number / Percentage Of F's = ");
                   ExamScores.add(lblGradeF, cc.xy(9, 19));
                   //---- txtTotalNumberF ----
                   txtTotalNumberF.setEnabled(false);
                   txtTotalNumberF.setEditable(false);
                   ExamScores.add(txtTotalNumberF, cc.xy(11, 19));
                   //---- txtPercentageF ----
                   txtPercentageF.setEnabled(false);
                   txtPercentageF.setEditable(false);
                   ExamScores.add(txtPercentageF, cc.xy(13, 19));
                   //---- lblTotalScores ----
                   lblTotalScores.setText("Total Number Of Scores =");
                   ExamScores.add(lblTotalScores, cc.xy(9, 21));
                   //---- txtTotalScores ----
                   txtTotalScores.setEditable(false);
                   txtTotalScores.setEnabled(false);
                   ExamScores.add(txtTotalScores, cc.xy(11, 21));
                   //---- lblMaxScore ----
                   lblMaxScore.setText("Highest Score:");
                   ExamScores.add(lblMaxScore, cc.xy(9, 23));
                   //---- txtMaxScore ----
                   txtMaxScore.setEditable(false);
                   txtMaxScore.setEnabled(false);
                   ExamScores.add(txtMaxScore, cc.xy(11, 23));
                   //---- lblMinScore ----
                   lblMinScore.setText("Lowest Score:");
                   ExamScores.add(lblMinScore, cc.xy(9, 25));
                   //---- txtMinScore ----
                   txtMinScore.setEditable(false);
                   txtMinScore.setEnabled(false);
                   ExamScores.add(txtMinScore, cc.xy(11, 25));
                   //---- lblAvgScore ----
                   lblAvgScore.setText("Average Score:");
                   ExamScores.add(lblAvgScore, cc.xy(9, 27));
                   //---- txtAverageScore ----
                   txtAverageScore.setEditable(false);
                   txtAverageScore.setEnabled(false);
                   ExamScores.add(txtAverageScore, cc.xy(11, 27));
              // JFormDesigner - End of component initialization //GEN-END:initComponents
         private JPanel ExamScores;
         private JLabel lblHeading;
         private JButton btnEnterGrades;
         private JButton btnReset;
         private JButton btnAbout;
         private JLabel lblGradeA;
         private JTextField txtTotalNumberA;
         private JTextField txtPercentageA;
         private JLabel lblGradeB;
         private JTextField txtTotalNumberB;
         private JTextField txtPercentageB;
         private JLabel lblGradeC;
         private JTextField txtTotalNumberC;
         private JTextField txtPercentageC;
         private JLabel lblGradeD;
         private JTextField txtTotalNumberD;
         private JTextField txtPercentageD;
         private JLabel lblGradeF;
         private JTextField txtTotalNumberF;
         private JTextField txtPercentageF;
         private JLabel lblTotalScores;
         private JTextField txtTotalScores;
         private JLabel lblMaxScore;
         private JTextField txtMaxScore;
         private JLabel lblMinScore;
         private JTextField txtMinScore;
         private JLabel lblAvgScore;
         private JTextField txtAverageScore;
         // JFormDesigner - End of variables declaration //GEN-END:variables
    public static void main(String[] args)
    ExamScore window = new ExamScore();
    // window.setVisible(true); // you can't make a JPanel visible on its own
    JFrame frame = new JFrame("My Designer"); // JFrames can be made visible on their own
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //so the program will end when the JFrame is closed
    frame.getContentPane().add(window); // *** add our JPanel into the JFrame here
    frame.pack(); // size the panel and frame correctly
    frame.setLocationRelativeTo(null); // place frame in the center
    frame.setVisible(true); // show it all
    Note: I have imported the jgoodies.from.layout by adding the com.jgoodies.forms.layout folder into the directory where the .java file is kept. That seems to be working ok!
    Edited by: Petidiz on Sep 10, 2008 8:00 PM

    I made this change to the end of the coding
    ExamScore window = new ExamScore();
    // window.setVisible(true); // you can't make a JPanel visible on its own
    JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));//("My Designer"); // JFrames can be made visible on their own
    //panel.setDefaultCloseOperation(JPanel.EXIT_ON_CLOSE); //so the program will end when the JFrame is closed
    //panel.getContentPane().add(window); // *** add our JPanel into the JFrame here
    //panel.pack(); // size the panel and frame correctly
    // panel.setLocationRelativeTo(null); // place frame in the center
    panel.setVisible(true); // show it all
    But still no display, if you could help me with the coding to get it correct I would be very apprecitive..i am a complete noob in java.

  • Help, problem with keeping ipod connected..

    When I connect my ipod, it updates in itunes and then disconnects itself from the computer...how do I make it so after it updates it stays connected and keeps flashing "Do Not Disconnect" on the ipod?

    rahul,
    OK, I do understand you may be having some early problems with just a little bit of data with a few tunes. Have you thought about what you will do in the future as you add more? This is my post on that topic:
    I have been trying to find a way to upload my CD library to my new 60GB iPod (that function works fine) and classify / manage my CD library on it (using iTunes)- that function is nearly unworkable. Now, today, I have used my only 'free' direct APPLE Support contact and the basic answer was 'Too Bad for You!! The iPod does not have nor support multi level indexing or playlists!!!! So...go ahead, load 500 or 600 Cd's onto your iPod and then try to find the tracks you wish to play!! It can't be done except for a 'flat' one level filing system!!! What a BUMMER

Maybe you are looking for

  • T-SQL: Manual Backup of Multiple Databases

    I am looking to change the way I do manual backups of multiple databases on the same instance of SQL Server 2008 R2. Currently I have T-SQL scripts for each database that look like this: BACKUP DATABASE [mydbname] TO DISK = N'D:\backup\manual\2014-01

  • Attaching a viewpoint to a mobile object (ctnd)

    I am trying to attach the user's viewpoint to a moving object in Java 3D. I failed until now to have my code working. Here is a piece of code that exhibits the problem. I used the HelloWorld3D that is in the Java 3D examples from Sun. I inserted an a

  • Why won't pdf files display in safari?

    I just upgraded to Lion I am trying to view douments on a website I had no issue with on Leopard.  But now it is saying that the plug in is missing.  I checked other options I removed the adobe plug-in and nothing.  Then when i download the coument P

  • New iPods - AC adapter?

    The new gen of iPods come with an AC adapter...how does this adapter work...how does it connect to the iPod to charge it? My guess is...that you need to buy a firewire cable to connect the adapter and iPod together...right? Sorry, newbie to iPods. Al

  • Portal content BP for EHS

    Hi EHS gurus, I would like to know whether there is any BP for SAP Portal content(EP7) for EHS(ECC6). I have found a BP BPEHS501_0-20000614 and imported in SAP portal. I got a role with pages for Industrial Hygiene&Safety and Product Safety. Is this