Pls help with CS4 error!

I have been working with Dreamweaver CS4 for sometime now. I  tried to open a file but it took forever so I tried to force quit  it. Still it was not responding so I shut my computer down and waited for 30 minutes. I tried to open it again but after i click the icon it jumps on the dock for a few seconds and goes away. Now All my other CS4 applications will not launch either. I tried to delete preferences but nothing so I uninstalled it. I just installed a fresh CS4 copy but it still will not work/launch. Thank you. I am using mac OS 10.5 Leopard. Never had a problem with any CS4 before. All my other applications work well only Adobe CS4 will not
Please!!!!!! I really need your help guys!
Thanks

Always run disk utility before deleting prefs or reinstalling anything. Usually deleting prefs will cure what ails your apps. Use uninstall utility to uninstall apps if you have to go that route. Don't just drag them to the trash. The uninstall will remove all associated files for each apps. Be aware there are usually more than one pref file for an app.

Similar Messages

  • Pls. help with ADO Error Code

    Somebody pls. advise how to overcome this error  see snapshot
    [http://img16.imageshack.us/my.php?image=errw.jpg]
    The SQL returns results in TOAD but CR is unable to recognise th tables. 
    Mave

    Hi,
    The screen shot you sent is the dsn dailog box.
    You need to create DSN first  to create odbc connectivity
    Go through the steps as written below.
    1) Start=> Programme => Control Panel => Administrative Tools => ODBC Panel.
    2)  Select System  tab and  click on add tab.
    3)Once you click add you will get drivers list select oracle driver .
    4)provide dsn name and further information .
    and now start the process of connectivity  in that box you will get the name you given select that and
    make connectivity.
    Regards,
    Neo .

  • Installing Elements 11 on Mac. Need help with install error "Setup wants to make changes."

    Installing Elements 11 on Mac 10.8.2. Need help with install error:  Setup wants to make changes. Type your password to allow this."  After entering Adobe password, nothing happens.  Locked from further installation.  Any ideas?  Adobe phone support could not help.

    Just before letting changes (installation in this case) be made on the system, Mac OS prompts for password & this has to be the Mac system password. This password prompt is the system's own native prompt & would accept the system password only. Please make sure it is the right system password (all/admin rights) and the installaion should run.

  • Can anyone help with this error? ;At line 102 of file"C:/Program files (x86)/Macromedia/Dreamweaver

    Can anyone help with this error please?;At line 102 of file"C:/Program files (x86)/Macromedia/Dreamweaver 8/Configuration/Objects/Common/Images.js"; TypeError: cmdDOM.parentWindow.setFormItem is not a function

    If Dreamweaver shows a message saying "the following JavaScript error(s) occurred",  it's usually a sign of a corrupt cache file. The first thing you should always be to delete the file cache. If that doesn't work, delete your personal Configuration folder. Please go through the steps mentioned in thread Deleting a corrupted cache file.

  • HT201299 HOW TO INSERT MICRO SIM IN I PAD MODEL- A1416? Pls help with a picture...

    HOW TO INSERT MICRO SIM IN I PAD MODEL- A1416? Pls help with a picture...

    My Ipad doesnt have the space to pin out the sim card tray...?
    I think i have been gifted the Ipad which doesnt support sim card. Is it so?
    My model no is- A1416....?

  • Need help with CS4 transitions

    Hi,
    I am trying to use a cross dissolve transition. To make it simple, I have two clips. I'm obviously doing something wrong here. I've watched the Adobe TV tutorial and all the guy does is to select cross dissolve from the effects box, and drags it over to the clip on the timeline. I think I am doing the exact same thing, but when I play my clip back, I can see no transition effect played back.
    Maybe I'm putting it in the wrong place I thought, so I tried putting it in front of the split between the two clips. Then again at the beginning of the second clip. Neither of them worked, so I shut CS4 down, and booted it up again. I started a new project, and put two new clips in it. I put the dissolve transition at the beginning of the second clip, and it worked like a charm. Then to see if that was a fluke, went to a point about 3 minutes earlier in the timeline. So now I am on clip one. I go and make a cut in the timeline, and try to place another Cross dissolve at this spot. It appears to place the transition there because it creates the rectangular box, and it has the name cross dissolve in that rectangular box,but when I try to play it to see the transition, it isn't working. Go back to the beginning of the second clip, and that one still works perfectly.
    I noticed that there is a difference in the appearance of the two cross dissolve rectangular boxes. The one that works has a single diagonal line that goes from lower left to upper right in the cross dissolve box, and then there are a whole series of diagonal lines that go from upper left to lower right all across the cross dissolve box . It looks like a whole bunch of dark gray and white backslashes. In the one that doesn't work, there is just that single diagonal line that goes from lower left to upper right. No backslashes on this one. What am I doing right in the first one, but not in the second?
    I find that it will work perfectly if I put in a new clip. If I put in the Cross Dissolve at the beginning of a new clip that I add to the timelime,  it will work perfectly. It is only when I try to split a clip that is already on the timeline, and then put the cross dissolve in at that point.
    Perhaps it is not possible to do what I am attempting to do. Maybe you can't split a clip and place the transition at that point?

    When I am shooting video, it is not unusual for me to be taping a scene of a mountain, for example, and then put the camera on pause, while I briefly position myself to take video of the river that is flowing at my feet. That is what is happened on this clip that I am attempting to put the transition in between. Rather than having the scene just instantly change at this point, from the mountain to the river, it would be nice to have a smoother transition then that.
    My mind was working on the problem while sleeping last night, and I think I might understand how to handle it. It might have been too simple for me to think about yesterday. I haven't tried it yet, but would it not work, to insert the mountain scene from my source monitor into the timeline, and then go back and insert the river scene into the time line instead of inserting both of them at the same time. Would these not now be two separate clips on the timeline, and the transition could now be applied?
    Your analogy with the DJ is very good, but it isn't quite the same. You are correct in that he would be only fading from one song to the same spot on the same song. In my case I am going from an image of a mountain to an image of a river. Same clip, but different images. I appreciate the help, and your thoughts.
    Terry Lee Martin
    Date: Sat, 22 Aug 2009 23:15:55 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help with CS4 transitions
    From a creative standpoiint, I don't understand the desire to transition from one clip to the exact same spot on that same clip.  That's like a DJ at a night club fading from one song to the exact same spot on that same song being played on a second CD player.  What's the point?
    >

  • Please help with compiling error

    Hello, I am currently taking a class in Java Programming and need help with an error. I am working on a Mortgage Calculator and when I compile the code I get this error. I have no idea how to fix this. Can anyone help? Thank you.
    '{' expected public class MortgageCalculator
    1 error
    Tool completed with exit code 1
    Here is my code
    import java.io.*;//*java input output
    import java.util.Date;//Date Utility
    import java.util.Formatter;//format Utility
    import java.text.NumberFormat;//*format numbers
    //class MortgageCalculator
    public class MortgageCalculator
    public static void main(String[]args);{
    Date currentDate=newDate();
    DecimalFormat decimalPlaces=newDecimalFormat("0.00");
    //declare Variables
    final double principalBalance=200000;//*$200,000 Loan
    final double monthlyInterest=.06;//*6% interest rate
    final double Term=12*30;//*monthly interest rate
    final double monthlyInterest=((principalBalance*(monthlyInterest/12))/(1-Math.pow(1+(monthlyInterest/12))-(Term)));
    //Display Output
    System.out.println("\t\t" + currentDate);
    System.out.println("\t\tLoan Amount" + principalBalance);
    System.out.println("\t\tInterest Rate" + monthlyInterest);
    System.out.println("\t\tTerm of Loan" + Term);
    System.out.println("\t\tThe Payment will be:" + monthlyInterest);
    System.out.println(decimalPlaces.format(mothlyInterest));
    }

    You need to enclose your class body in { }. You're missing at least one of them

  • Pls Help with this

    Hi,
    I need a help to resolve my problem.Actually i have a JSP page with a list box. When i select some value in the list box, appropriate values must list out according to the selected value.And i have a submit button to process that jsp page.
    I wrote a validation as all the fields must be entered to submit a page.
    But when i tried with the following code,it's just moving to processing page when i select a values from the list box.This is happening when i cheked the validation.
    Pls help with this code.This is very urgent.
    Code is as follows
    "Example1.jsp"
    <%
    String str1 = request.getParameter("Modem");
    %>
    <html>
    <head>
    <script language = "JavaScript">
    function Validate()
    if(document.UpdateFiosAccounts.Modem.value == "Select One")
    alert("Please select the value")
    document.UpdateFiosAccounts.Modem.focus()
    return false
    if(document.UpdateFiosAccounts.text1.value == "")
    alert("Please type some text")
    document.UpdateFiosAccounts.text1.focus()
    return false
    return true
    </script>
    </head>
    <body>
    <form name = "UpdateFiosAccounts" action="./Example1.jsp" method ="post" onSubmit= "return Validate()">
    Pls select One:<select name="Modem" size="1" onChange="document.UpdateFiosAccounts.submit()">
    <%
    if(str1 == null)
    %>
         <option value="Select One">Select One</option>
         <option value="One">One</option>
         <option value="Two">Two</option>
         <option value="Three">Three</option>
         <option value="Four">Four</option>
    <%
    else
    %>
         <option value="<%=str1%>"><%=str1%></option>
    <%
    %>
    </select><br>
    Pls type something: <input type ="text" name="text1">
    <input type ="submit" value="submit" onClick="document.UpdateFiosAccounts.action='./Accounts.jsp'">
    </form>
    </body>
    </html>

    Hi! The reason is that in the onChange property you are doing the submit, so, when you select something, it goes automatically and never pases through your validation function. So, remove that onChange. Next, the button is a submit buton, so, no matter what your validation does, the page will go. You need to change the submit type of the button to just button (<input type="button" onclick="function to validate">) and then you will get what you want. By the way, this is NOT a Java question, is more JavaScript question.
    Hope this helps.

  • Help with CreateDefaultDomain error

    hello guy,
    Please i need help with this errors
    "*ERROR: An error occurred while building the default domain.*
    *Please see this log file for more details:*
    *C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\o.j2ee.adrs\CreateDefaultDomain.log*"
    This is the content of the log.
    *"Default domain will be created:*
    *C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain*
    *C:\oracle\Middleware\wlserver_10.3\common\bin\wlst.cmd "C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\o.j2ee.adrs\CreateDefaultDomain.py"*
    *Process started*
    *wlst > 'C:\WINDOWS\system32\QTJava.zip' is not recognized as an internal or external command,*
    *wlst > operable program or batch file.*
    *Elapsed time: 609 ms".*
    this error is effecting the applications i built.
    thank
    kolly

    just check your parameter... it means that the parameter on showInputDialog on the API dont match with the parameter with your showInputDialog code

  • Help with code errors

    Can somebody help me get rid of the following compile errors:
    coreservlets/OrderPage.java:61: setNumOrdereed(int, int) in coreservlets.ShoppingCart
    cannont be applied to (java.lang.String,int)
    cart.setNumOrdered(recordingid, numItems);
    .\coreservlets\shoppingCart.java:44 cannot resolve symbol
    symbol : variable recordingid
    location: class coreservlets.ShoppingCart
    if (order.getrecordingid() == (recordingid)) {
    .\coreservlets\ShoppingCart.java:49: cannot resolve symbol
    symbol : variable recordingid
    location: class coreservlets.ShoppingCart
    itemOrder new order = new ItemOrder(Catalog.getItem(recordingid));I know that not very helpful with out the code but the code is very big so if anyone wants me to post extracts from the code please tell me.

    Thank you i put that code in but now get the following:
    coreservlets/OrderPage.java:40:  incompatible types
    found : java.lang.strgin
    required: int int recordingid = request.getParameter("recordingid")!=null?request.getParameter("recordingid"):1;
    ^/code]
    coreservlets/OrderPage.java:48: addItem(java.lang.String) in coreservlets.ShoppingCart cannot be applied to (int)
    cart.additem(recordingid);
    .\coreservlets\AhoppingCart.java:44: cannot resolve symbol
    symbol: variable recordingid
    location: class coreservlets.ShoppingCart
    if (order.getrecordingid() == (recordingid)) {
    .\coreservlets\AhoppingCart.java:49: cannot resolve symbol
    symbol: variable recordingid
    location: class coreservlets.ShoppingCart
    ItemOrder newOrder = new ItemOrder(Catalog.getItem(recordingid));
    4 errors.
    Also could you explain what the line you added to the code means:
    !=null?request.getParameter("recordingid"):1;
    !=null?request.getParameter("numItems"):"1";and how come you got rid of if (recordingid != null) {Thanks for any help with these errors
    OK I HAVE GOT RID OF ALL THE ERRORS APART FROM THE TOP ONE:
    code]coreservlets/OrderPage.java:40: incompatible types
    found : java.lang.strgin
    required: int
    int recordingid = request.getParameter("recordingid")!=null?request.getParameter("recordingid"):1;
                                            /code]
    Message was edited by:
            ajrobson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help with the error message that ADE is not allowed to copy a book onto my Nook. I have tried authorizing and unauthorizing many times--at wits end with this issue.

    Help with the error message that ADE is not allowed to copy a book onto my Nook. I have tried authorizing and unauthorizing many times--at wits end with this issue.

    I too am having the same problem. I have a new hard drive that was imaged from the old one and I'm trying to side load a book to my Nook Simple Touch.. I first installed ADE 4 then borrowed and downloaded a book from Overdrive. I tried a few times to delete and reauthorize both the computer and the Nook and each time I get an authorization error when I try to side load the book. I then found on the Nook forum that the Simple Touch and ADE 4 don't get along. So I uninstalled ADE 4 and installed ADE 3.
    I then followed this recommended procedure found on the forum: I deleted the Digital Editions folder from my Nook, launched ADE 3 and authorized the computer, then connected the Nook. For a few seconds, hovering the mouse over the setting icon for the Nook displayed everything on the context menu grayed out. But then it showed the context menu and I was able to display the Nook's authorization, which was the same as the computer's. Still get the same error side loading the book. Deleting and reauthorizing doesn't help.  And the Digital Editions folder is still missing from the Nook.

  • Need a little help with some errors.

    Receiving some errors..
    btn2.addActionListener(new ActionListener() {
    and also
    frame.setLocation(400,400);
    frame.setVisible(true);
    }<<~~has 2 errors here...
    Both above have class or interface expected errors..clueless on what i'm missing at the moment.
    Anyone mind pointing out what {'s and }'s i'm missing?
         btn1.addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent evt) {
                                  btn1actions();
              private void btn1actions() {
                   if (radio1.isSelected()) System.out.println("Radio Button 1 is selected.");
                   if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.");
         btn2.addActionListener(new ActionListener() {
                                       public void actionPerformed(ActionEvent evt) {
                                            btn2actions();
                        private void btn2actions() {
                             if (radio1.isSelected()) System.out.println("Radio Button 1 is selected.");
                             if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.");
                   btn3.addActionListener(new ActionListener() {
                                       public void actionPerformed(ActionEvent evt) {
                                            btn1actions();
                        private void btn3actions() {
                             txt1.setText("");
                             txt1.requestFocus();
    public static void main(String[] args) {
        Test2 frame = new Test2();
        frame.setTitle("Test Frame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(400, 300);
        frame.setLocation(400,400);
        frame.setVisible(true);
    }

    All my code..finally posted...just need help with more errors.
    F:\DocumentsTest2.java:169: ';' expected
              btn1.addActionListener(new ActionListener()) {
    ^
    F:\Documents\Test2.java:176: illegal start of expression
              private void btn1actions() {
    ^
    F:\Documents\Test2.java:191: illegal start of expression
              private void btn2actions() {
    ^
    F:\Documents\.java:202: illegal start of expression
              private void btn3actions() {
    ^
    4 errors
    Tool completed with exit code 1
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test2 extends JFrame{
         static JButton btn1,btn2,btn3;
         static JTextField txt1;
         static JRadioButton radio1,radio2;
           public Test2() {
             Container container = getContentPane();
             container.setLayout(new BorderLayout());
              //Create Panels
                JPanel Panel1 = new JPanel();
                JPanel Panel2 = new JPanel();
                JPanel Panel3 = new JPanel();
                JPanel Panel4 = new JPanel();
                JPanel Panel5 = new JPanel();
                JPanel Panel6 = new JPanel();
                JPanel Panel7 = new JPanel();
                JPanel Panel8 = new JPanel();
                JPanel Panel9 = new JPanel();
                JPanel Panel10 = new JPanel();
              //Set Layout for Panels
              Panel3.setLayout(new BorderLayout());
              Panel4.setLayout(new BorderLayout());
              Panel5.setLayout(new BorderLayout());
              Panel6.setLayout(new BorderLayout());
              Panel10.setLayout(new BorderLayout());
              //Create the Various Fonts and Colors for this GUI
              Font font1 = new Font("SansSerif", Font.BOLD, 20);
              Font font2 = new Font("Serif", Font.PLAIN, 15);
              Color color1 = new Color(3,15,125);//A Dark Blue Color
              Color color2 = new Color(201,29,10);//A Red Color
              Color color3 = new Color(127,127,127);//A Grey Color
              //Create Buttons and Labels
             btn1 = new JButton("Submit");
             btn2 = new JButton("Display Schedule");
             btn3 = new JButton("Enter New Name");
             JLabel label1 = new JLabel("Student Name");
             JLabel label2 = new JLabel("Course Number");
              JLabel label3 = new JLabel("Welcome to the Java Community College");
              JLabel label4 = new JLabel("Registration System!");
              //Declare Text Field For Entering Student Names
              txt1 = new JTextField(15);
              //"Put Course Number from another Method Here"
              String[] courseStrings = { "CISM2230 A", "CISM2230 B", "CISM1110 A", "CISM1110 B", "CISM1120 A", "CISM1120 B" };
              JComboBox Combo1 = new JComboBox(courseStrings);
              //Declare Radio Buttons for Add and Drop Course
              radio1 = new JRadioButton("Add a Course", false);
              radio2 = new JRadioButton("Drop a Course", false);
              ButtonGroup radioButtons = new ButtonGroup();
              radioButtons.add(radio1);
              radioButtons.add(radio2);
              //Panel 10 is the Main Displaying Panel
              Panel10.add(Panel3, BorderLayout.NORTH);
              Panel10.add(Panel4, BorderLayout.CENTER);
              Panel10.add(Panel8, BorderLayout.SOUTH);
              //Panel 3 Used to Display Label 3 and 4 using Panels 1 and 2
              Panel3.add(Panel1, BorderLayout.NORTH);
              Panel3.add(Panel2, BorderLayout.CENTER);
              Panel1.add(label3);
             Panel2.add(label4);
              //Panel 4 Used to Display Student Name, Txt1, Course Number, Combo Box and Radio Buttons
             Panel5.add(label1, BorderLayout.NORTH);
             Panel5.add(txt1, BorderLayout.CENTER);
             Panel6.add(label2, BorderLayout.NORTH);
              Panel6.add(Combo1, BorderLayout.CENTER);
              Panel7.add(radio1, BorderLayout.NORTH);
              Panel7.add(radio2, BorderLayout.CENTER);
              Panel4.add(Panel5, BorderLayout.NORTH);
              Panel4.add(Panel6, BorderLayout.CENTER);
              Panel4.add(Panel7, BorderLayout.SOUTH);
              //Panel 8 Used to Display the Buttons
              Panel9.add(btn1, BorderLayout.CENTER);
              Panel9.add(btn2, BorderLayout.CENTER);
              Panel9.add(btn3, BorderLayout.SOUTH);
              Panel8.add(Panel9, BorderLayout.CENTER);
              //Setting Background, ForeGround and Font of all Text.
             Panel1.setBackground(color3);
             Panel2.setBackground(color3);
             Panel3.setBackground(color3);
             Panel4.setBackground(color3);
             Panel5.setBackground(color3);
             Panel6.setBackground(color3);
             Panel7.setBackground(color3);
             Panel8.setBackground(color3);
             Panel9.setBackground(color3);
             Panel10.setBackground(color3);
             btn1.setBackground(color3);
             btn2.setBackground(color3);
             btn3.setBackground(color3);
             radio1.setBackground(color3);
             radio2.setBackground(color3);
             btn1.setFont(font2);
             btn2.setFont(font2);
             btn3.setFont(font2);
             Combo1.setFont(font2);
             Combo1.setBackground(color3);
             Combo1.setForeground(color1);
             label1.setFont(font2);
             label2.setFont(font2);
             label3.setFont(font1);
             label4.setFont(font1);
             label1.setForeground(color2);
             label2.setForeground(color2);
             label3.setForeground(color1);
             label4.setForeground(color1);
             container.add(Panel10);
              //Setting Keyboard Shortcuts to Radio Buttons and Regular Buttons
              btn1.setMnemonic('S');
              btn2.setMnemonic('D');
              btn3.setMnemonic('E');
              radio1.setMnemonic('A');
              radio2.setMnemonic('C');
              //ActionListener
              btn1.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                        btn1actions();
              private void btn1actions() {
                   if (radio1.isSelected()){ System.out.println("Radio Button 1 is selected. Button 1")};
                   if (radio2.isSelected()){ System.out.println("Radio Button 2 is selected. Button 1")};
              btn2.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                                            btn2actions();
              private void btn2actions() {
                   if (radio1.isSelected()) System.out.println("Radio Button 1 is selected(Button 2).");
                   if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.Button 2");
              btn3.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                        btn1actions();
              private void btn3actions() {
                   txt1.setText("");
                   txt1.requestFocus();
         public static void main(String[] args) {
             JavaCollegeTest2 frame = new JavaCollegeTest2();
             frame.setTitle("Project 4");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setSize(400, 300);
             frame.setLocation(400,400);
             frame.setVisible(true);
    }

  • Pls help with a program

    I'm making a quiz, and i store the questions in a textfile. The user can choose from 3 quizes, either Plate Tectonics, Rivers or Rocks. I managed to call the questions from Java. Each quiz has a set of 10 questions. In the code below i only included the answers to the Plate Tectonics Quiz, which i stored in an array. What i'm having problem with is, that its not working correctly, since it is displaying, after answering all the questions correctly that i have answered 0 questions from 1 question. First of all it should say out of 10 questions because i have 10 questions, and its not really working because even if i answer them all corrctly it still says 0 out of 1 question. Can someone pls help me find the error? Thanks a lot.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import java.util.Scanner;
    import java.util.Arrays;
    public class GeographyQuiz extends JFrame implements ActionListener {
      private static final int FRAME_WIDTH = 140;
      private static final int FRAME_HEIGHT = 160;
      private static final int FRAME_X_ORIGIN = 70;
      private static final int FRAME_Y_ORIGIN = 50;
       AnswerStore answerStore = new AnswerStore();
      public static void main (String[] args) {
        JFrame jFrame;
        jFrame = new JFrame();
        JOptionPane.showMessageDialog(jFrame, "This is a Geography Quiz");
        JOptionPane.showMessageDialog(null, "Good Luck");
        char choice;
        int i, choice1, Password;
        String yourChoice, passString;
        passString = JOptionPane.showInputDialog("Enter the Password");
        //Password = passString.nextInt();
        Password = Integer.parseInt(passString);
        if (Password == 123) {
         JOptionPane.showMessageDialog(null, "Valid. You typed the right password. Now choose from the following menu");
         GeographyQuiz frame = new GeographyQuiz();
          frame.setVisible(true);
        } else {
          JOptionPane.showMessageDialog(null, "Invalid Password. Try Again");
      public GeographyQuiz() {
        Container contentPane;
        JButton button1, button2, button3, button4, button5;
        setSize (FRAME_WIDTH, FRAME_HEIGHT);
        setTitle("Geography Quiz");
        setLocation(FRAME_X_ORIGIN, FRAME_Y_ORIGIN);
        contentPane = getContentPane();
        contentPane.setBackground(Color.pink);
        contentPane.setLayout(new FlowLayout());
        button1 = new JButton("Plate Tectonics");
        button2 = new JButton("Rivers");
        button3 = new JButton("Rocks");
        button4 = new JButton("Quit");
        contentPane.add(button1);
        contentPane.add(button2);
        contentPane.add(button3);
        contentPane.add(button4);
        button1.addActionListener(this);
        button1.setActionCommand("b1");
        button2.addActionListener(this);
        button2.setActionCommand("b2");
        button3.addActionListener(this);
        button3.setActionCommand("b3");
        button4.addActionListener(this);
        button4.setActionCommand("b4");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
       public void actionPerformed(ActionEvent e) {
    String ac = e.getActionCommand();
            String[] questions = null;
             try {
            if (ac.equals("b1")) {
                questions = readFile("plate_tectonics.txt");
            } else if(ac.equals("b2")) {
                questions = readFile("rivers.txt");
            } else if(ac.equals("b3")) {
                questions = readFile("rocks.txt");
            } else if (ac.equals("b4")) {
                System.exit(0);
            askQuestions(questions);
         catch (java.io.FileNotFoundException f)
            JOptionPane.showMessageDialog(null, "File not found.");
        private String[] readFile(String path)throws FileNotFoundException {
            Scanner s = null;
            StringBuilder sb = new StringBuilder();
            String separator = "\n";
            try {
                s = new Scanner(new BufferedReader(new FileReader(path)));
                s.useDelimiter(",\\s*");
                while (s.hasNext()) {
                   JOptionPane.showInputDialog(null,s.nextLine());
            finally {
                if (s != null)
                    s.close();
            return sb.toString().split("\\s");
        private void askQuestions(String[] questions) {
            int count = 0;
            for(int j = 10; j < questions.length; j++) {
                 String input = JOptionPane.showInputDialog(null, questions[j]);
                 // Use reference to AnswerStore instance to access data in it.
                 if(answerStore.answer[j].equals(input))
                 count++;
            JOptionPane.showMessageDialog(null, "You answered " + count +
                                          " out of " + questions.length +
                                          " questions correctly.");
    class AnswerStore  {
    String[] answer = {
            "Hellenic", "constructive", "100km", "Italy", "Wegner",
            "constructive", "100km", "Italy", "destroyed", "Meditteranean"
    }Edited by: saytri on Dec 23, 2007 2:07 AM
    Edited by: saytri on Dec 23, 2007 2:29 AM

    stripped to bare bones, it works OK for me
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class GeographyQuiz extends JFrame implements ActionListener {
      AnswerStore answerStore = new AnswerStore();
      public static void main (String[] args) {
        JOptionPane.showMessageDialog(null, "This is a Geography Quiz\n\nGood Luck");
        char choice;
        int i, choice1, Password;
        String yourChoice;
        GeographyQuiz frame = new GeographyQuiz();
        frame.setVisible(true);
      public GeographyQuiz() {
        Container contentPane;
        JButton button1;
        setSize (140, 160);
        setTitle("Geography Quiz");
        setLocationRelativeTo(null);
        contentPane = getContentPane();
        contentPane.setBackground(Color.pink);
        contentPane.setLayout(new FlowLayout());
        button1 = new JButton("Plate Tectonics");
        contentPane.add(button1);
        button1.addActionListener(this);
        button1.setActionCommand("b1");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
      public void actionPerformed(ActionEvent e) {
        String ac = e.getActionCommand();
        String[] questions = null;
        if (ac.equals("b1")) {
          questions = new String[]{"what is 1+1","what is 2+2"};
          askQuestions(questions);
      private void askQuestions(String[] questions) {
          int count = 0;
          for(int j = 0; j < questions.length; j++) {
            String input = JOptionPane.showInputDialog(null, questions[j]);
            if(answerStore.answer[j].equals(input)) count++;
          JOptionPane.showMessageDialog(null, "You answered " + count +
                                        " out of " + questions.length +
                                        " questions correctly.");
    class AnswerStore  {
    String[] answer = {"2", "4"};
    }either the problem is in the file, or the posted code is not what you're using

  • Help with SIGSEGV error, please?

    Greetings,
    I have no idea what this error log means. It only happens on one computer, so it isn't the program. Something in the system is messed up. Can anyone tell what from this?
    # A fatal error has been detected by the Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x00007fff840542db, pid=533, tid=36871
    # JRE version: 7.0_10-b18
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode bsd-amd64 compressed oops)
    # Problematic frame:
    # C  [libGL.dylib+0x22db]  glGetString+0xf
    # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
    http://pastie.org/8138651
    And where do I type "ulimit -c unlimited"? I typed it in Terminal, but nothing happened.
    Thanks

    Hi, I�m currently writing some code that requires me
    to read in a list of names and prices from a txt file
    then sort them, I have so far successfully created a
    menu and the code to read in my txt file "cars.txt"
    however it is returning me with an error, I need to
    sort this part out before I can move on to the
    sorting section, any help would be much appreciated,
    James
    C:\Documents and Settings\James\Desktop\lateast
    java\carprogramjames.java:54: unreported exception
    java.io.FileNotFoundException; must be caught or
    declared to be thrown
              Scanner scan = new Scanner (myFile);
              ^
    1 error
    Tool completed with exit code 1Do it like this:
    public void ReadCarsAndPricesFromFile() throws FileNotFoundException {
    }orpublic void ReadCarsAndPricesFromFile() {
        try {
            Scanner scan = new Scanner (myFile);
        } catch(FileNotFoundException  fnfe) {
            fnfe.printStackTrace();
    }Details:
    http://java.sun.com/docs/books/tutorial/essential/exceptions/
    And also take the time to read this:
    http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
    Good luck.

  • Need help with resolving error

    Hi,
    I am working on an ADF aaplication Each time I hit the execute button on my application I get the following error message,
    JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was null
    JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was null
    Does anyone know why this come up? and what can I do to resolve this issue?
    Be very grateful to get a response soon.

    The page is suppose to be a search page, you could key in all the information in all the fields, but not mandatory. when I run the seach and key the info, then hit execute, the first time it runs very fine, but if want to make a second search it come up with the error.
    I hope with this I could get some help.
    Thank you very much

Maybe you are looking for