How to display rectangles with the following code in a JPanel?

I am trying to make a bunch of random rectangles appear inside a JPanel on a GUI form. Im not sire how to display the form and panel with random rectangles. I have in my package the MyRectangle class, a blank JForm class called RectGUI and the class for the panel RectGUIPanel. The following code is from my panel and it should create random rectangles okay but how do I display them inside of a Panel on my RectGUI form? Thanks for the assistance.
//Declare variables
    private int x;
    private int y;
    private int width;
    private int height;
    private Color color;
    Random rand = new Random();
    public class RectanglePanel extends JPanel
        public void displayRectangles()
            // Declare an arraylist of MyRectangles
            ArrayList<MyRectangle> myArray = new ArrayList<MyRectangle>();
            int maxNumber = 300;
           // Declare Frame and Panel
            JFrame frame = new JFrame();
            Container pane = frame.getContentPane();
            RectanglePanel rect = new RectanglePanel();
            // Set Frame attributes
            frame.setSize(700, 500);
            frame.setLocation(100,100);
            frame.setAlwaysOnTop(true);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setTitle(" Rectangle Program");
            frame.setVisible(true);
            for (int i = 0; i < maxNumber; i++)
                MyRectangle rec = createRandomRec();
                myArray.add(rec);
                rect.repaint();
        public MyRectangle createRandomRec()  
               x = rand.nextInt();
               y = rand.nextInt();
               width = rand.nextInt();
               height = rand.nextInt();
               color = new Color(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256));
               return new MyRectangle(x, y , width, height, color);
    }

I am trying to make a bunch of random rectangles appear inside a JPanel on a GUI form. Im not sire how to display the form and panel with random rectangles. I have in my package the MyRectangle class, a blank JForm class called RectGUI and the class for the panel RectGUIPanel. The following code is from my panel and it should create random rectangles okay but how do I display them inside of a Panel on my RectGUI form? Thanks for the assistance.
//Declare variables
    private int x;
    private int y;
    private int width;
    private int height;
    private Color color;
    Random rand = new Random();
    public class RectanglePanel extends JPanel
        public void displayRectangles()
            // Declare an arraylist of MyRectangles
            ArrayList<MyRectangle> myArray = new ArrayList<MyRectangle>();
            int maxNumber = 300;
           // Declare Frame and Panel
            JFrame frame = new JFrame();
            Container pane = frame.getContentPane();
            RectanglePanel rect = new RectanglePanel();
            // Set Frame attributes
            frame.setSize(700, 500);
            frame.setLocation(100,100);
            frame.setAlwaysOnTop(true);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setTitle(" Rectangle Program");
            frame.setVisible(true);
            for (int i = 0; i < maxNumber; i++)
                MyRectangle rec = createRandomRec();
                myArray.add(rec);
                rect.repaint();
        public MyRectangle createRandomRec()  
               x = rand.nextInt();
               y = rand.nextInt();
               width = rand.nextInt();
               height = rand.nextInt();
               color = new Color(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256));
               return new MyRectangle(x, y , width, height, color);
    }

Similar Messages

  • What's wrong with the following code?

    What's wrong with the following code?
    Circle cir1;
    double rad = cir1.radius

    The circle Object was never instantiated.
    In other words, you have set a declaring of a Circle, but it has not been created in memory yet.
    You will create it using the " = new Circle( PARAMETERS_HERE ); "
    Or some other method that returns a circle.

  • HT201274 Can a Sprint Iphone 5 work with T-mobile network? How can one unlock with the MSL code? Sprint is not abiding by the Unlocking Consumer Choice and Wireless Competition Act.  FCC will only enforce if we file more complains.

    Can a Sprint Iphone 5 work with T-mobile network? How can one unlock with the MSL code? Sprint is not abiding by the Unlocking Consumer Choice and Wireless Competition Act.  FCC will only enforce if we file more complains.

    T-Mobile is a GSM network whereas Sprint is a CDMA network. They are incompatible. Sprint is not obliged to unlock a phone that is still under contract. Their phones may not be capable of being unlocked.

  • Need help with the following code (Want an input popup with numeric pad)

    Hello,
    I put the following code in an event :
    import javax.swing.JOptionPane;
    value = javax.swing.JOptionPane.showInputDialog("Price", "");
    try {
    Double newPrice = new Double(value);
    line.setPriceTax(newPrice);
    } catch (NumberFormatException e) {
    JOptionPane.showMessageDialog(null, "Not valid number: " + value, "Error", JOptionPane.PLAIN_MESSAGE);
    But this only gives an input popup screen and then i have to use a keyboard instead of my touchscreen to give the input,
    i would rather like it to be a popup input screen with a numeric pad attached.
    Is this possible, and how??
    Thanks in advance.
    Jeroen

    hii,
    set321go wrote
    make your own. Create a custom OptionPane and add --->
    // global def.
    private final JLabel amountLabel = new JLabel(" Input Trades Amount : ");
    private JFormattedTextField amountTextField;
    private double amount = 0.00;
    private NumberFormat amountFormat;
    // in panel class add --->
    amountFormat = NumberFormat.getNumberInstance();
    amountFormat.setMinimumFractionDigits(2);
    amountFormat.setMaximumFractionDigits(2);
    amountFormat.setRoundingMode(RoundingMode.HALF_EVEN);
    amountLabel.setFont(new Font("Serif", Font.BOLD, 16));
    amountLabel.setForeground(KopikSalesTest.textColor);
    amounTextField = new JFormattedTextField(amountFormat);
    amountTextField.setValue(0.00);
    amountTextField.setFont(new Font("Serif", Font.BOLD, 20));
    amountTextField.setForeground(Color.someColor);
    amountTextField.setBackground(Color.someColor);
    amountTextField.addFocusListener(new FocusListener() {
                public void focusGained(FocusEvent e) {
                    amountTextField.requestFocus();
                    amountTextField.setText(amountTextField.getText());
                    amountTextField.selectAll();
                public void focusLost(FocusEvent e) {
                    //on exit
    somePanel.add(amountLabel);
    somePanel.add(amountTextField); ... kopik

  • How to display data with the same text and key in the drop down list?

    Hi All,
    Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    REPORT ZTESTING.
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST,
          c(20) type c.
    *      c = 'select any'.
    data:begin of itab occurs 0,
          kunnr like kna1-kunnr,
          name1 like kna1-name1,
         end of itab.
    data:begin of jtab occurs 0,
          kunnr like kna1-kunnr,
          land1 like kna1-land1,
         end of jtab.
    PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
                              default 'SELECT'.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'p_list'.
    VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    APPEND VALUE TO LIST.
    VALUE-KEY = '2'.
    VALUE-TEXT = 'Country'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    start-of-selection.
    select kunnr name1 up to 20 rows from kna1 into table itab.
    select kunnr land1 up to 20 rows from kna1 into table jtab.
    case p_list.
    when '1'.
    loop at itab.
    write:/ itab-kunnr,itab-name1.
    endloop.
    when '2'.
    loop at jtab.
    write:/ jtab-kunnr,jtab-land1.
    endloop.
    endcase.
    <Added code tags>
    Moderator Message: Please use the "code" tags to format your code snippet.
    Edited by: Suhas Saha on Nov 17, 2011 11:19 AM

    shawnTan wrote:
    Hi All,
    >
    > Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    >
    >
    REPORT ZTESTING.
    >
    > TYPE-POOLS: VRM.
    >
    > DATA: NAME  TYPE VRM_ID,
    >       LIST  TYPE VRM_VALUES,
    >       VALUE LIKE LINE OF LIST,
    >       c(20) type c.
    >
    > *      c = 'select any'.
    >
    > data:begin of itab occurs 0,
    >       kunnr like kna1-kunnr,
    >       name1 like kna1-name1,
    >      end of itab.
    >
    > data:begin of jtab occurs 0,
    >       kunnr like kna1-kunnr,
    >       land1 like kna1-land1,
    >      end of jtab.
    >
    > PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
    >                           default 'SELECT'.
    >
    > AT SELECTION-SCREEN OUTPUT.
    >
    > NAME = 'p_list'.
    >
    > VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    > VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    > APPEND VALUE TO LIST.
    >
    > VALUE-KEY = '2'.
    > VALUE-TEXT = 'Country'.
    > APPEND VALUE TO LIST.
    >
    > CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    >
    > start-of-selection.
    > select kunnr name1 up to 20 rows from kna1 into table itab.
    > select kunnr land1 up to 20 rows from kna1 into table jtab.
    >
    > case p_list.
    > when '1'.
    > loop at itab.
    > write:/ itab-kunnr,itab-name1.
    > endloop.
    >
    > when '2'.
    > loop at jtab.
    > write:/ jtab-kunnr,jtab-land1.
    > endloop.
    > endcase.
    >
    > <Added code tags>
    >
    > Moderator Message: Please use the "code" tags to format your code snippet.
    >
    > Edited by: Suhas Saha on Nov 17, 2011 11:19 AM
    This surely seems to be a bug to me(if not by design),  did you check for any SAP notes? Perhaps a front end trace can help(Note 407743) !
    -Rajesh.

  • How to highlight rows in the following code.

    Hi,
      I am using the following logic to display 2 lists at a time.
    I want to highlight the last 2 rows of both the lists that I am displaying.how to do it.
    Kindly help.
    TYPE-POOLS : slis.
    TABLES : mara,
    makt.
    SELECT-OPTIONS : mat FOR mara-matnr.
    DATA : BEGIN OF itab OCCURS 0,
    matnr LIKE mara-matnr,
    maktx LIKE makt-maktx,
    matkl LIKE mara-matkl,
    mtart LIKE mara-mtart,
    END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0,
    mtart LIKE mara-mtart,
    count TYPE i,
    END OF itab1.
    DATA : BEGIN OF itab1_col OCCURS 0,
    mtart LIKE mara-mtart,
    count TYPE i,
    END OF itab1_col.
    DATA : t_fcat1 TYPE slis_t_fieldcat_alv,
    t_fcat2 TYPE slis_t_fieldcat_alv,
    wa_fcat TYPE slis_fieldcat_alv,
    t_eve TYPE slis_t_event,
    wa_eve TYPE slis_alv_event,
    t_layout TYPE slis_layout_alv.
    DATA : v_repid LIKE sy-repid,
    t_mat LIKE mara-matnr.
    DEFINE create_fcat.
    clear wa_fcat.
    wa_fcat-fieldname = &1.
    wa_fcat-seltext_l = &2.
    wa_fcat-outputlen = &3.
    append wa_fcat to t_fcat1.
    END-OF-DEFINITION.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM dis_data.
    *& Form get_data
    text
    FORM get_data.
    SELECT amatnr bmaktx amtart amatkl INTO CORRESPONDING FIELDS OF TABLE itab
    FROM mara AS a INNER JOIN makt AS b ON
    amatnr = bmatnr
    WHERE a~matnr IN mat.
    LOOP AT itab.
    itab1-mtart = itab-mtart.
    itab1-count = 1.
    APPEND itab1.
    ENDLOOP.
    SORT itab1 BY mtart.
    LOOP AT itab1.
    MOVE-CORRESPONDING itab1 TO itab1_col.
    COLLECT itab1_col.
    ENDLOOP.
    ENDFORM. "get_data
    *& Form dis_data
    text
    FORM dis_data.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
    i_callback_program = v_repid.
    REFRESH t_fcat1.
    CLEAR t_fcat1.
    REFRESH t_eve.
    wa_eve-name = 'TOP_OF_PAGE'.
    wa_eve-form = 'TOP_OF_PAGE1'.
    APPEND wa_eve TO t_eve.
    create_fcat:
    'MATNR' 'Material' '10',
    'MAKTX' 'Material Description' '40',
    'MTART' 'Type' '10',
    'MATKL' 'Group' '10'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    is_layout = t_layout
    it_fieldcat = t_fcat1
    i_tabname = 'ITAB'
    it_events = t_eve
    TABLES
    t_outtab = itab.
    REFRESH t_fcat1.
    CLEAR t_fcat1.
    REFRESH t_eve.
    wa_eve-name = 'TOP_OF_PAGE'.
    wa_eve-form = 'TOP_OF_PAGE2'.
    APPEND wa_eve TO t_eve.
    create_fcat:
    'MTART' 'Type' '10',
    'COUNT' 'Total' '5'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    is_layout = t_layout
    it_fieldcat = t_fcat1
    i_tabname = 'ITAB1_COL'
    it_events = t_eve
    TABLES
    t_outtab = itab1_col.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    ENDFORM. "dis_data
    *& Form top_of_page1
    text
    FORM top_of_page1.
    FORMAT COLOR COL_POSITIVE.
    WRITE:/ 'First Block'.
    FORMAT COLOR OFF.
    ENDFORM. "top_of_page
    *& Form top_of_page2
    text
    FORM top_of_page2.
    FORMAT COLOR COL_NEGATIVE.
    WRITE /5 'Second Block'.
    FORMAT COLOR OFF.
    ENDFORM. "top_of_page

    Hi Renu,
    U Can use this FORM
    FORM TOP_OF_PAGE.
      FORMAT FRAMES ON INTENSIFIED ON COLOR = 7.
      WRITE : / 'SOURCE SYSTEM INFORMATION'.
      FORMAT FRAMES OFF INTENSIFIED OFF COLOR OFF.
      FORMAT FRAMES ON INTENSIFIED ON COLOR = 2.
      WRITE : / 'User Name  : ', sy-uname.
      WRITE : / 'System ID  : ', sy-sysid.
      WRITE : / 'Client     : ', sy-mandt.
      WRITE : / 'System Date: ', sy-datum.
      WRITE : / 'System Time: ', sy-uzeit.
      FORMAT FRAMES OFF INTENSIFIED OFF COLOR OFF.
    ENDFORM. "TOP_OF_PAGE
    U can make changes accordingly
    Rohit G

  • Whats wrong with the following code?

    if currencyName =( "Euros" )
              amount = amount * 1.02;
          else if currencyName =( "Yen" )
              amount = amount * 1.20;
          else if currencyName =( "Pesos" )
              amount = amount * 10;I get error that a ( is needed
    I tried the following:
    if (currencyName =( "Euros" ))
              amount = amount * 1.02;
          else if (currencyName =( "Yen" ))
              amount = amount * 1.20;
          else if (currencyName =( "Pesos" ))
              amount = amount * 10;
          }This gave me error required boolean with arrow pointing to the equals sign.

    Now it's not putting the changed number into amount (I think)
    when I run it gives me the orginal number instead of the mutilpied number.
    I must be missing something rather obvious here.
           // get dollar amount
          double amount =
            Double.parseDouble( dollarJTextField.getText() );
          // get currencty name
          String currencyName = dollarJTextField.getText() ;
          // perform currency conversion
          if (currencyName.equals( "Euros" ))
              amount*= 1.02;
          else if (currencyName.equals( "Yen" ))
              amount*= 1.20;
          else if (currencyName.equals( "Pesos" ))
              amount*= amount * 10;
          //display converted amount
          convertedJTextField.setText( String.valueOf( amount) );

  • CS3 Crashing with the following code

    Try this in CS3.
    1) Open a new page.
    2) Paste the following between the body tags.
    <cfoutput>
    <form>
    <select name="whatever">
    <cfloop index="x" from="1" to="12">
    <option value="#x#">#x#</option>
    </cfloop>
    </select>
    </form>
    </cfoutput>
    3) Save the file using a cfm extension
    4) in design mode click on the dropdown.
    5) That's crash-tastic!
    wtf adobe. This only works if the file extension is .cfm
    which leads me to believe it's some cf parsing code that DW uses
    when coding in Coldfusion.

    mikechyu wrote:
    > Try this in CS3.
    Try this
    http://www.adobe.com/go/kb402776
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to write proc() with the following requirement

    Hi..
    I've written the following procedure
      PROCEDURE createMoney (
        pcsId      IN  NUMBER,
        spsId      IN  NUMBER,
        spgId      IN  NUMBER,
        apsId      IN  NUMBER,
        apgId      IN  NUMBER,
        charge     IN  NUMBER,
        pdtId     OUT  NUMBER
      IS
       pcsDetId NUMBER:=1;
      BEGIN
        INSERT INTO T_PDT (PDT_ID,PRS_ID,SPS_ID,SPG_ID,APG_ID,
                       APS_ID,DK_CED,CHG)
           VALUES(pcsDetId,pcsId, spsId,spgId,apgId,
                       apsId,charge);
        pdtId := pcsDetId;
      END;Then got the requirement that
    *'createMoney' is creating new price.
    Change it to get a procedure like 'setMoney' that would insert if not exists, or update if exists? *
    Could you help me in doing this so..
    Thanks

    Hi,
    Example with DUAL
    SQL> select * from dept;
        DEPTNO DNAME          LOC          
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> merge into dept d1
      2  using (select 50 as deptno from dual) d2
      3  on (d1.deptno=d2.deptno)
      4  WHEN MATCHED THEN
      5      UPDATE SET d1.loc = 'Mumbai'
      6    WHEN NOT MATCHED THEN
      7      INSERT
      8      VALUES (50,'sw','Mumbai');
    1 row merged.
    SQL> select * from dept;
        DEPTNO DNAME          LOC              
            50 sw             Mumbai                
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> merge into dept d1
      2  using (select 50 as deptno from dual) d2
      3  on (d1.deptno=d2.deptno)
      4  WHEN MATCHED THEN
      5      UPDATE SET d1.loc = 'London'
      6    WHEN NOT MATCHED THEN
      7      INSERT
      8      VALUES (50,'sw','Mumbai');
    1 row merged.
    SQL> select * from dept;
        DEPTNO DNAME          LOC              
            50 sw             London                
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> Twinkle

  • Hashtables: What on earth is wrong with the following code!?

    I'm loosing my mind here:
    [jdk1.4.2]
    //random code...
            Hashtable threads = new Hashtable(20);
            threads.put(portNum, ipThread); //portNum is of type int
                                            //ipThread is of type ThreadX, ThreadX extends Thread
    //other code...
            ThreadX t;
            t = (ThreadX)threads.get(packet.getPort());  //packet.getPort() returns an INTAnd the compiler returns this:
    path>javac *.java
    IPServer.java:58: cannot resolve symbol
    symbol : method put (int,ThreadX)
    location: class java.util.Hashtable
    threads.put(destinationPort, ipThread);
    ^
    IPServer.java:67: cannot resolve symbol
    symbol : method get (int)
    location: class java.util.Hashtable
    t = (ThreadX)threads.get(packet.getPort());
    ^
    2 errors
    Thanks ahead of time.

    From the JDK 1.4.2 documentation
    "This class implements a hashtable, which maps keys to values. Any non-null object can be used as a key or as a value.
    To successfully store and retrieve objects from a hashtable, the objects used as keys must implement the hashCode method and the equals method. "
    I assumed from that an int or double or any other primitive, which implements both the hashCode and equals method, would work.

  • Please help me on a form i push the submit button and all i get is a page with the following code wh

    <?php
    //--------------------------Set these paramaters--------------------------
    // Subject of email sent to you.
    $subject = 'Results from Contact form';
    // Your email address. This is where the form information will be sent.
    $emailadd = '[email protected]';
    // Where to redirect after form is processed.
    $url = 'http://www.karenwebster.info/confirmation.html';
    // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
    $req = '1';
    // --------------------------Do not edit below this line--------------------------
    $text = "Results from form:\n\n";
    $space = ' ';
    $line = '
    foreach ($_POST as $key => $value)
    if ($req == '1')
    if ($value == '')
    {echo "$key is empty";die;}
    $j = strlen($key);
    if ($j >= 20)
    {echo "Name of form element $key cannot be longer than 20 characters";die;}
    $j = 20 - $j;
    for ($i = 1; $i <= $j; $i++)
    {$space .= ' ';}
    $value = str_replace('\n', "$line", $value);
    $conc = "{$key}:$space{$value}$line";
    $text .= $conc;
    $space = ' ';
    mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    ?>
    where do i put this and what am imissing

    I don't know why but after about an hour the tool bar you rferred to came on its self jsut as the support solution and you have advised and it is now working, but the toolbar just disappears and that is why I could not find the link or correct store link. Weird! But thanks, Gordon

  • Error in the following code

    Hi
    If anyone can let me know why there is a problem with the following code. I get the following errors:
    ')' or ',' expected

    Sorry I did add in but it did not post....Anyway code below the erroe line are in bold. Line: 22,23 & 24.
    function scaleMovieClip(movieclip, seconds, startAtX, endAtX, startAtY, endAtY, trans)
        new mx.transitions.Tween(movieclip, "_yscale", trans, startAtY, endAtY, seconds, true);
        var _loc2 = new mx.transitions.Tween(movieclip, "_xscale", trans, startAtX, endAtX, seconds, true);
    } // End of the function
    function setPage()
        btnN = ["b" + prod];
        page = btnN;
        pageT.text = page;
        ptest.text = mypage;
        var mcTween = new mx.transitions.Tween(main, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1.000000E-001, true);
        mcTween.onMotionFinished = function (ev)
            main.gotoAndStop(page);
            var _loc1 = new mx.transitions.Tween(main, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 3, true);
        for (i = 0; i < prodArray.length; i++)
            bNum = i + 1;
           eval("["b" + bNum]")._xscale = 100;
            eval("["b" + bNum]")._yscale = 100;
            eval("["b" + bNum]").enabled = true;
        } // end of for
        eval("[page]").swapDepths(_root.getNextHighestDepth());
        quote1.removeMovieClip();
        eval("[page]").enabled = false;
        eval("[page]")._xscale = 120;
        eval("[page]")._yscale = 120;
    } // End of the function
    stop();
    prodArray = new Array("CFL Change-Over", "Showerheads", "Insulation", "Solar PV", "Solar Hot Water", "Tank to Toilet", "Heat Pumps", "Misc Hot Water");
    b1.onRollOver = b2.onRollOver = b3.onRollOver = b4.onRollOver = b5.onRollOver = b6.onRollOver = b7.onRollOver = b8.onRollOver = function ()
        scaleMovieClip(this, 1, 100, 120, 100, 120, mx.transitions.easing.Strong.easeOut);
        attachMovie("quote", "quote1", _root.getNextHighestDepth());
        quote1._x = -300;
        quote1._x = _xmouse + 10;
        quote1._y = _ymouse + 35;
        trace (_xmouse);
        if (_xmouse <= 130)
            quote1.gotoAndStop(2);
            quote1._x = _xmouse;
            quote1._y = _ymouse + 35;
        } // end if
        if (_xmouse >= 790)
            quote1.gotoAndStop(3);
            quote1._x = _xmouse + 10;
            quote1._y = _ymouse + 35;
        } // end if
        quote1.startDrag(lockcenter);
        btnN = this._name;
        item = btnN.substr(btnN.length - 1, btnN.length) - 1;
        myMsg = prodArray[item];
        quote1.msg = myMsg;
    b1.onRollOut = b2.onRollOut = b3.onRollOut = b4.onRollOut = b5.onRollOut = b6.onRollOut = b7.onRollOut = b8.onRollOut = function ()
        scaleMovieClip(this, 1, 120, 100, 120, 100, mx.transitions.easing.Strong.easeOut);
        quote1.removeMovieClip();
    b1.onRelease = b2.onRelease = b3.onRelease = b4.onRelease = b5.onRelease = b6.onRelease = b7.onRelease = b8.onRelease = function ()
        btnN = this._name;
        item = btnN.substr(btnN.length - 1, btnN.length) - 1;
        page = btnN;
        var mcTween = new mx.transitions.Tween(main, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1.000000E-001, true);
        mcTween.onMotionFinished = function (ev)
            main.gotoAndStop(page);
            var _loc1 = new mx.transitions.Tween(main, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 3, true);
        for (i = 0; i < prodArray.length; i++)
            bNum = i + 1;
            eval("["b" + bNum]")._xscale = 100;
            eval("["b" + bNum]")._yscale = 100;
            eval("["b" + bNum]").enabled = true;
        } // end of for
        this.swapDepths(_root.getNextHighestDepth());
        quote1.removeMovieClip();
        this.enabled = false;
        this._xscale = 120;
        this._yscale = 120;
    if (prod != "" || prod != null)
        prodTxt.text = prod;
        setPage();
    } // end if

  • My iphone 4 started displaying a message box with the following message: "This accessory is not optimized for this phone. You may experience noise and loss of battery."  My question is: how to fix this?

    My iphone 4 started displaying a message box with the following message: "This accessory is not optimized for this phone. You may experience noise and loss of battery."  My question is: Why is this happening and how do I fix it? (I'm losing battery power precipitously). Thanks in advance for any assistance with this question.

    Thanks Kilted Tim, you solved the problem. I'm mightily impressed at the simplicity of the solution!
    Jaded Kane

  • When I try to install adobe photoshop 13 on my computer it comes up with the following error message " This installer does not support installation on a 64bit windows operating system" error code 6. How to I recify this? TIA

    When I try to install adobe photoshop 13 on my computer it comes up with the following error message " This installer does not support installation on a 64bit windows operating system" error code 6. How to I recify this? TIA

    You can try downloading the 64 bit version.  You can download the trial version of the software thru the page linked below and then use your current serial number to activate it.
    Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site and have cookies enabled in your browser or else the download will not work properly.
    Photoshop/Premiere Elements 13: http://prodesigntools.com/photoshop-elements-13-direct-download-links-premiere.html

  • "Another program on your computer would like to modify Firefox with the following add-on" - how to disable?

    I am using the latest Firefox (28.0) on Windows XP in a shared computer environment. Although I do not have Administrator access, I installed Firefox myself and can change whatever Firefox config settings I want (including about:config and mucking with the files in the installation directory).
    I want to disable the tab that appears on Firefox startup, "Another program on your computer would like to modify Firefox with the following add-on". This tab usually appears once per day (the first time I startup Firefox each day). I want the tab not to appear at all, from now on.
    The "another program" in question is some program that is used in the facility where I'm using the computer, so I can't just uninstall that program. Although this is a shared computer environment, they don't "wipe" the machine every day, just reboot. So the Firefox I installed is still there with all my config settings intact. As far as I know, I'm the only person who uses Firefox on this computer.
    Solutions that don't work:
    "Just click Continue" -- but then I still see the "Another program" tab every day, and don't want to see it.
    "Click Remove in the Add-ons list" -- I removed the Add-on in question but the tab still appears every day.
    I would like a solution that either eliminates the Add-on request for that particular application, or eliminates all such requests ("Another program...") regardless of what application requested it. The ideal solution would be if the request itself had a checkbox for "never ask this again" but, alas, no such luck.

    Gosh... I spent about an hour preparing a response, then accidentally did control-something or alt-something which took me back a page and I lost everything I typed (even after I clicked Forward to try to get back to where I was). If anyone knows of a config setting like "don't ever trash an entire page of user input unless the user explicitly confirms it", or, "keep form input data even if the user goes Back or Forward", I think that would be a great feature.
    OK, back to the original question...
    I appreciate the responses thus far, but I think there have been some misunderstandings. Maybe a multiple-choice version would help:
    Question: Is there a way to suppress the appearance of the notification tab that says, "Another program on your computer would like to modify Firefox with the following add-on" (meaning, any request from another program to install an add-on is to be silently ignored and discarded)?
    Answer:
    (A) Yes, you can suppress that notification (please state how).
    (B) No, but you can request that feature (please state where).
    (C) No, you can't do that or request that feature.
    That's basically my question in a nutshell. If the answer is (B), I might envision a boolean about:config setting like "extensions.allowProgrammaticAddonRequests" that defaults to "true" and can be set to "false" manually. I think that would be the most direct solution (if it were possible).
    I will respond to some comments from above:
    "I don't understand why you are using a mozilla.cfg file to lock those preferences when you can modify the preferences for your current Firefox profile via about:config" -- This is because the "other program" in question (iCafe Manager) was setting certain config options (browser.startup.homepage, and browser.newtab.url) on every reboot (which happens every morning at that facility). I got tired of manually changing the settings back every day. Using the above-mentioned files, I successfully defeated iCafe Manager's daily interference with those config settings. The other things (like stuff related to Socks tunnelling) I probably could have just set once in about:config but doing a lockPref seemed to do no harm. The settings for "enabledScopes" and "xpinstall" were to see if they'd help with the problem I originally asked about, but they did not.
    "I would look in about:config to make sure those preference modifications are in effect" -- yes, I confirmed that the settings are in effect and locked. That much works as expected.
    "A) removing the iCafe Toolbar extension from the Firefox Addons -> Extensions panel results in the "Another program" tab at startup" -- true, but I think it would be more accurate to say: while the toolbar extension is not installed (due to either having been removed, or, never having been installed at all), the "Another program" tab appears on at least the first startup of Firefox after every reboot.
    "B) when you allow the installation it shows up as "(disabled)" in the Extensions list but the unwanted toolbar still shows up (correct?)" -- yes, correct.
    "You could explain the problem to the system administrator of your facility" -- unfortunately, there's no administrator on site, only a person who makes sure the lights are on. They'll call a tech if there's a catastrophic problem (like the net connection goes dead). Since I installed Firefox myself, and since iCafe Manager is a program they installed, I don't think they'll go out of their way to help me with Firefox (especially if I'm trying to defeat iCafe Manager's attempts to interfere with Firefox). From their point of view, their systems are working just fine.
    "allow the installation and then see if you can go to the Firefox Customize menu and HIDE the toolbar as a workaround" -- since I'm not in that facility now (and probably won't be again until this summer or so), I can't experiment with those systems now. But I do recall clicking just about everything I could, including "View - Toolbars" (which seems to be the same menu as when I right-click on a toolbar line). That menu allows hiding toolbars, but from my recollection, the offending toolbar was not displayed in the list, so I could not hide it that way. Also, the Customize menu ("View - Toolbars - Customize") seems to allow only modifications to a toolbar, and not a way to hide an entire toolbar.
    "it might help if you could post a new troubleshooting information list after you allow the iCafe Toolbar installation" -- ok, that troubleshooting report is included below.
    Thanks again for your help.
    Application Basics
    Name: Firefox
    Version: 28.0
    User Agent: Mozilla/5.0 (Windows NT 5.1; rv:28.0) Gecko/20100101 Firefox/28.0
    Crash Reports for the Last 3 Days
    All Crash Reports
    Extensions
    Name: iCafe Manager Toolbar
    Version: 5.2.0.6
    Enabled: false
    ID: {C058FE28-1E07-4FD1-8092-046F8A964D12}
    Important Modified Preferences
    accessibility.typeaheadfind.flashBar: 0
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.cache.disk.smart_size_cached_value: 358400
    browser.newtab.url: about:blank
    browser.places.smartBookmarksVersion: 6
    browser.sessionstore.upgradeBackup.latestBuildID: 20140314220517
    browser.startup.homepage: http://www.google.com/ncr
    browser.startup.homepage_override.buildID: 20140314220517
    browser.startup.homepage_override.mstone: 28.0
    dom.mozApps.used: true
    extensions.lastAppVersion: 28.0
    gfx.blacklist.direct2d: 3
    gfx.blacklist.layers.direct3d10: 3
    gfx.blacklist.layers.direct3d10-1: 3
    gfx.blacklist.layers.direct3d9: 3
    gfx.blacklist.layers.opengl: 3
    gfx.blacklist.stagefright: 3
    gfx.blacklist.suggested-driver-version: 6.1400.1000.5218
    gfx.blacklist.webgl.angle: 3
    gfx.blacklist.webgl.msaa: 3
    gfx.blacklist.webgl.opengl: 3
    network.cookie.prefsMigrated: true
    network.websocket.enabled: false
    places.database.lastMaintenance: 1398414928
    places.history.enabled: false
    places.history.expiration.transient_current_max_pages: 53428
    plugin.disable_full_page_plugin_for_types: application/pdf
    plugin.importedState: true
    plugin.state.npgoogleupdate: 1
    privacy.sanitize.migrateFx3Prefs: true
    privacy.sanitize.sanitizeOnShutdown: true
    storage.vacuum.last.index: 1
    storage.vacuum.last.places.sqlite: 1396778909
    Graphics
    Adapter Description: Intel(R) G33/G31 Express Chipset Family
    Adapter Drivers: igxprd32
    Adapter RAM: Unknown
    Device ID: 0x29c2
    Direct2D Enabled: Blocked for your graphics driver version. Try updating your graphics driver to version 6.1400.1000.5218 or newer.
    DirectWrite Enabled: false (0.0.0.0)
    Driver Date: 11-3-2008
    Driver Version: 6.14.10.5009
    GPU #2 Active: false
    GPU Accelerated Windows: 0/1 Basic Blocked for your graphics driver version. Try updating your graphics driver to version 6.1400.1000.5218 or newer.
    WebGL Renderer: Blocked for your graphics driver version. Try updating your graphics driver to version 6.1400.1000.5218 or newer.
    Vendor ID: 0x8086
    windowLayerManagerRemote: false
    AzureCanvasBackend: skia
    AzureContentBackend: cairo
    AzureFallbackCanvasBackend: cairo
    AzureSkiaAccelerated: 0
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.3
    Version in use: 4.10.3
    NSS
    Expected minimum version: 3.15.5 Basic ECC
    Version in use: 3.15.5 Basic ECC
    NSSSMIME
    Expected minimum version: 3.15.5 Basic ECC
    Version in use: 3.15.5 Basic ECC
    NSSSSL
    Expected minimum version: 3.15.5 Basic ECC
    Version in use: 3.15.5 Basic ECC
    NSSUTIL
    Expected minimum version: 3.15.5
    Version in use: 3.15.5

Maybe you are looking for

  • How to deploy the skins in ADF ?

    Hi All, I am using JDeveloper 11.1.1.4 My Scenario is I have Project A with some CSS(skins) and bounded task flows.I deploy as ADF Library JAR  . Now I attach the Project A Jar to Project B.I can access the bounded task flows but the CSS(skins) style

  • 3 question about cookie and session please.

    1. I know that session automatic use in JSP by default and save session id in cookie. I have code that show all cookie on my computer <%      Cookie [ ] listcookie = request.getCookies();      Cookie mycookie = null;      for(int i=0; i<listcookie.le

  • I bought an audio book like 2 years ago, but now i dont have it

    A lot of stuff happened since then and now it's no where on my iPod/iPhone or in my iTunes on the computer( i switched computers since then and didn't take a lot of stuff, but it's the same account). When i searched it in the store it just says "buy"

  • SQLLDR Command line arg question.

    Is there a way to override , from the command line, the table_name of the ... INTO TABLE table_name ... clause of SQLLDR's LOAD statement? ie. If my control file looked like this ... LOAD DATA INFILE * APPEND INTO TABLE my_table_1 could I have data l

  • Necesito cambiar mis preguntas de seguridad de la cuenta apple

    NO puedo cambiar las respuestas , y tampoco me las sé. Necesito ayuda gracias.