Code Help Please.

I am havong trouble getting equations to work on my calculator.
I have the basic going, but as soon as I try to add any more to it at this point it will not compute.
I need to add commission to the 20% and 5% based on the T1 and T2 x $25.00.
Can a figure only be used once in any equations?
I need to use the input for T1 to generate different #'s in 2 other fields.
Here is a link to it,
www.thepowderzone.com/Calculator.htm
Could someone please help?

Bump!!

Similar Messages

  • HT5622 I have set up my ipad but cant remember the 4 digit code I put in . I cloud does not seem to have any record of me and the ipad mini keeps locking me out as i try different codes - help please

    Help please I have just got my Ipad Mini and set it up but cant remember the code I put in. I cant access settings or anything else as it has locked me out. Ive treid Icloud but it doesnt recognise tht I have registered. Can anyone give me straightforward instructions on how to start again please

    This is the guidance from Apple:
    http://support.apple.com/kb/HT1212
    Barry

  • PHP/mySQL code help please

    Hi all,
    Thanks to David Powers fab tutorial I am now well on my way to competeing my first dynamique website using PHP/mySQL, (thanks David ), however I am stuck on one particular area....can anyone please help?
    I know that the mySQL database uses the format YYYY/MM/DD for dates, and that is fine. I've sorted out how to display in a more regular format (eg. 1st September 2011) for my application, but I am stuck on how to convert a more regular formatted date entered by the site user into the mySQL format.
    Ideally I would like for the users entry or say either 1/9/11 or 1-9-11 (or something along those lines, to be recognised and displayed on the entry form, but to have a backend function that converts the data to mySQL format. I seem to be reading plenty of forum posts which say this can be done, but unfortunately I can't quite seem to fathom how, or where the code should sit. Would someone mind taking a look at my code page to actually identify what I need to insert, and equally as importantly...where!!!
    Along these lines...is it possible to have a mini-calendar date picker that could be embedded next to the date entry field to ensure that a valid date is entered and in the correct format? Where could this be sourced?
    Thanks in advance of some much needed help
    Mark

    This is becoming really frustrating for me (so god knows how I am to you!!!!), but I usually pick things up so fast and yet this whole PHP/SQL thing is eluding me!!
    I can see (I think) how the code would work, but am struggling to see where it fits into place with my own Dreamweaver 'Update Record' code, as follows. I have spent a couple of days trawling through PHP.net and various other sites and forums before bringing my stupidity to the public domain, but I just can't seem to crack it.
    This one last time then i'll leave you in peace??????
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
        $updateSQL = sprintf("UPDATE gig_guide SET `date`=%s, town=%s, venue=%s, private_or_public=%s, start_time=%s WHERE `index`=%s",
                           GetSQLValueString($_POST['date'], "date"),
                           GetSQLValueString($_POST['town'], "text"),
                           GetSQLValueString($_POST['venue'], "text"),
                           GetSQLValueString($_POST['type'], "text"),
                           GetSQLValueString($_POST['start_time'], "text"),
                           GetSQLValueString($_POST['index'], "int"));
      mysql_select_db($database_online, $online);
      $Result1 = mysql_query($updateSQL, $online) or die(mysql_error());
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_updatePost = "-1";
    if (isset($_GET['index'])) {
      $colname_updatePost = $_GET['index'];

  • Iframe shows only code - Help, please!

    I'm on OS X 10.4.5 and have designed a website that uses iframes (this is a must as there is a lot of content and I do not want the page bigger than the set size, so I need a way to scroll the content within the page size (955x600). I use Firefox for myself (and it looks great) but the person I'm doing the site for uses Safari. When he sees it, needless to say, it isn't going to look right. All it's displaying is the code for the iframe page as if I'm viewing the source for the page (within the iframe on the main page). Have they fixed the problem with iframes in Safari? And if so, what do I need to make it work in both browsers? Or is there another design tactic I can use instead of iframes?
    Any help or suggestions are very appreciated.
    Thanks!
    Mac mini   Mac OS X (10.4.5)  

    I actually found my error. It wasn't code within the file but I had saved it as a .php file (based on a file I found at another website that used it for their iframe) and when I changed it to .html it worked! But thanks, again, for your advice because it caused me to research iframes and I found they were all using .html/.htm files to call on.

  • Bar Codes(Help Please)

    Hi,
    I want my application to read bar codes of items and to store them to my database.Please, can you tell me if it is possible with Forms6 or Forms6; if so, please explain me the procedure even I want to insert records or I want to make updates(for example the quantity of an item with its bar code).
    Thank you to answer me.Regards.

    You mean store the image of the bar code ? Why do you want to do that ? A bar code is just the graphical representation of a number. Use a bar code scanner to translate the bar code to a number and store that. It will be much better. At least then you will be able to search for your product by that number and update the record with the qty as and when you wish.

  • HT4623 icant get ipod touch to turn on. the picture says to connect to itunes. when i connect to computer it says to enter pass code but will not gog to screen to enter code.help please

    i can not get ipod touch to turn on.  it shows picture to  connect to itunes but it says to enter  pass code but will not gogto screen to enter code.  HELP PLEASE

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...

  • Need a little code help please

    I am writing a program that shows a house with some clouds moving a the top. I have all the class compiling correctly, when it runs the clouds and background are painted over the house. I think I am just missing something small here. Can someone help me please. Thanks.
    public class BallApp extends javax.swing.JFrame {
      public BallApp (String title) {
        super(title);
        this.setSize(600, 450);
        this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
        this.add(new BallPanel());
        this.setVisible(true);
        this.add(new LinePanel());
        this.setVisible(true);
      public static void main (String [ ] args) {
        BallApp app = new BallApp ("Chapter 7: BallApp");
    public class LinePanel extends javax.swing.JPanel
       private SmartLine _myLine, _myLine2, _myLine3;          //instance variables for lines
       private SmartLine _myLine4, _myLine5;
       public LinePanel()
         super();
         _myLine = new SmartLine(210, 290, 210, 365, java.awt.Color.BLACK);  //creates lines sets position/color
         _myLine2 = new SmartLine(290, 290, 290, 365, java.awt.Color.BLACK);
            _myLine3 = new SmartLine (210, 365, 290, 365, java.awt.Color.BLACK);
         _myLine4 = new SmartLine (200, 300, 250, 245, java.awt.Color.BLACK);     
         _myLine5 = new SmartLine (250, 245, 300, 300, java.awt.Color.BLACK);
         this.setBackground(java.awt.Color.BLUE);     //sets background color
       public void paintComponent (java.awt.Graphics aBrush)
         super.paintComponent(aBrush);          //method paints lines on to panel
         java.awt.Graphics2D betterBrush = (java.awt.Graphics2D) aBrush;
         _myLine.draw(betterBrush);
         _myLine2.draw(betterBrush);
         _myLine3.draw(betterBrush);
         _myLine4.draw(betterBrush);
         _myLine5.draw(betterBrush);
    } //end of class
    public class BallPanel extends javax.swing.JPanel implements Mover {
        private final int INIT_X = 75; // attributes
        private final int INIT_Y = 75;
        private final int INIT_X1 = 0;
        private final int INIT_Y1 = 0;
        private final int DIAMETER = 60;
        private final int INTERVAL = 100;
        private BouncingBall _ball, _ball2; // components
        private MoveTimer _timer;
        public BallPanel () {
         super();
         _ball = new BouncingBall (java.awt.Color.white, this); 
         _ball2 = new BouncingBall (java.awt.Color.white, this);
         _timer = new MoveTimer(INTERVAL, this);
         //this.setBackground(java.awt.Color.blue);
         _ball.setLocation(INIT_X, INIT_Y);
         _ball.setSize(DIAMETER, DIAMETER);
         _ball2.setLocation(INIT_X1, INIT_Y1);
         _ball2.setSize(DIAMETER, DIAMETER);
         _timer.start();
        public void move() {
         _ball.move();
         _ball2.move();
         this.repaint();
        public void paintComponent (java.awt.Graphics aBrush) {
         super.paintComponent(aBrush);
         java.awt.Graphics2D betterBrush =
             (java.awt.Graphics2D) aBrush;
         _ball.fill(betterBrush);
         _ball2.fill(betterBrush);
    }

    ok.
    public interface Mover {
        public void move();
    public class BouncingBall extends SmartEllipse implements Mover {
        private int _changeX, _changeY; // attributes
        private final int MOVE_LEN = 5;
        private javax.swing.JPanel _panel; // peer object (and container)
        private javax.swing.Timer _timer;
        private double nextY;
        public BouncingBall (java.awt.Color aColor,
                             javax.swing.JPanel aPanel){
         super(aColor);
         _changeX = MOVE_LEN;
         _changeY = MOVE_LEN;
         _panel = aPanel; nextY=75;
        public void move() {
         int nextX = (int)this.getX() + _changeX;
         if (nextX <= this.getMinBoundX()) {
             _changeX *= -1;
             nextX = this.getMinBoundX();
         else if (nextX >= this.getMaxBoundX()) {
             _changeX *= -1;
             nextX = this.getMaxBoundX();
         this.setLocation(nextX, nextY);
        public int getMinBoundX() {
         return (int) _panel.getX();
        public int getMaxBoundX() {
              return (int) (_panel.getX() + _panel.getWidth()
                    - this.getWidth());
    public class MoveTimer extends javax.swing.Timer {
        private Mover _mover; // peer object
       public MoveTimer (int anInterval, Mover aMover) {
          super(anInterval, null);
          _mover = aMover;
          this.addActionListener(new MoveListener());
       private class MoveListener implements java.awt.event.ActionListener {
         public void actionPerformed(java.awt.event.ActionEvent e){
            _mover.move();
    public class SmartLine extends java.awt.geom.Line2D.Double
       private java.awt.Color _lineColor;
       private final int STROKE_WIDTH = 2;          //makes width of line constant
       private double X1, Y1, X2, Y2;          //set as instance variables that are doubles
       public SmartLine (double X1, double Y1, double X2, double Y2, java.awt.Color aColor)
         _lineColor = aColor;          //constructor
         setLine(X1,Y1,X2,Y2);
         X1 = 0;                    //sets intial positions to 0
         Y1 = 0;
         X2 = 0;
         Y2 = 0;
       public void setLineColor (java.awt.Color aColor)
         _lineColor = aColor;          //method for setting the color of the lines
       public void setLocation (double X1, double X2, double Y1, double Y2)
         this.setLine (getP1(), getP2()); //method for setting location of lines             
       public void draw (java.awt.Graphics2D aBrush)
         java.awt.Color savedColor = aBrush.getColor();        //method draws the line with color set
         aBrush.setColor(_lineColor);
         java.awt.Stroke savedStroke = aBrush.getStroke();
         aBrush.setStroke(new java.awt.BasicStroke(STROKE_WIDTH));
         aBrush.draw(this);
         aBrush.setStroke(savedStroke);
         aBrush.setColor(savedColor);
    } //end of class

  • Trouble with some code  help please

    i need help with this program i have to do a webclient in java i will put here the instructions that were given to me and then the work i have been doing so you can have an idea of what i'm doing any help you give me i will be very thankful thanks.
    Here are the instructions
    The class WebClient will represent a simple web client. This class must provide the following functions:
    1. connect to a web page using a URL
    2. obtain or get the response from a server
    This funcionality will be provided by the public interface of the class:
    - WebClient( )
    Creates a new object of the class
    - void setURL(String url)
    Used to indicate the URL of the web page
    - String getResponse()
    Gets the response of the server to the page who's URL was indicated(Example of a response: HTTP/1.0 200 OK)
    You have to implement the following:
    1. The class WebClient with an public interface that Includes the methods specified upwards, in a file called WebClient.java
    2.A class WebClientTester, in a file called WebClientTester.java, with a main program that minimun have to:
    a) Create a instance of WebClient
    b) Using 3 valid URL's
    - Invoque setURL to indicate the URL of the server
    - Invoque getResponse to get the response of the server
    - display in the console the response of the server
    c) Using 3 invalid URL's (this is the correct server but the page does not are on the server)
    - Invoque setURL to indicate the URL of the server
    - Invoque getResponse to get the response of the server
    - display in the console the response of the server
    As a tip they give me that i can use the clases HttpURLConnection and URL to implement WebClient. It is recommended to save the URL in an instance field of WebClient.
    Those are the instructions now i will write here what i have do until now
    This is the WebClient Class:
    public class WebClient
         public String Wecli;
         public WebClient()
              Wecli = new String();
         public void setURL(String url)
         /** need code here */     
         public String getResponse()
         /** need code here */     
         public void display()
              System.out.println(Wecli);
    what i need there is the methods constructors or whatever are so that setURL and getResponse work and do what are suposed to do.
    Here is The WebClientTester class
    public class WebClientTester
         public static void main(String[] args)
              WebClient wbcl = new WebClient();
              wbcl.setURL(http://www.nba.com);
              wbcl.getResponse();
              wbcl.display();
              wbcl.setURL(http://www.mlb.com);
              wbcl.getResponse();
              wbcl.display();
              wbcl.setURL(http://www.msn.com);
              wbcl.getResponse();
              wbcl.display();
         wbcl.setURL(http://www.nba.com/baseball.html);
              wbcl.getResponse();
              wbcl.display();
         wbcl.setURL(http://www.mlb.com/basketball.html);
              wbcl.getResponse();
              wbcl.display();
         wbcl.setURL(http://www.msn.com/practice.html);
              wbcl.getResponse();
              wbcl.display();
    that is basically what i think i need so that the program works any other help you can give me will be very useful thanks for reding it and give your opinions.

    Those are the instructions now i will write here what i have do until nowLooks like you've posted your homework instructions, done less than the bare minimum to make it look like you thought about this problem, and now you want strangers to help you cheat by giving you the code that does the work so you can hand it in as your own.
    %

  • Need code help, please

    I am making a program where there are 3 ellipses. For two of the ellipses I want they to be able to be dragged across the screen when the mouse is pressed on them, they will also change color. For the third ellipse I want all three ellipses to move and change color when I click on it. I have the two ellipses doing what I want but I cant get a third move them all. Thanks.
    public interface Draggable
       public void setColor      (java.awt.Color aColor);
       public void setLocation   (int x, int y);
       public void mousePressed  (java.awt.event.MouseEvent XX);
       public void mouseDragged  (java.awt.event.MouseEvent XY);
       public void mouseReleased (java.awt.event.MouseEvent XZ);
    import wheels.users.*;
    public class DraggableSun extends Ellipse implements Draggable
       private java.awt.Point _lastMousePosition;
       public DraggableSun (int x, int y)
          super (java.awt.Color.YELLOW);
          _lastMousePosition = new java.awt.Point ();
          this.setLocation (x, y);
       public void mousePressed  (java.awt.event.MouseEvent mouseEvent)
          _lastMousePosition = mouseEvent.getPoint ();
          this.setColor (java.awt.Color.BLUE);
       public void mouseDragged  (java.awt.event.MouseEvent me)
          java.awt.Point currentPoint;
          int diffX, diffY;
          currentPoint = me.getPoint ();
          diffX = currentPoint.x - _lastMousePosition.x;
          diffY = currentPoint.y - _lastMousePosition.y;
          this.setLocation
             this.getXLocation() + diffX,
             this.getYLocation() + diffY
          _lastMousePosition = currentPoint;
       public void mouseReleased (java.awt.event.MouseEvent me)
          this.setColor (java.awt.Color.YELLOW);
    import wheels.users.*;
    public class Leader extends DraggableSun
       private MovableSun follower1;
       private MovableSun follower2;
       public Leader(int x, int y, MovableSun follower1, MovableSun follower2)
         super(x,y);
         this.follower1 = follower1;
         this.follower2 = follower2;
       public void mousePressed (java.awt.event.MouseEvent e)
         super.mousePressed (e);
         this.setFillColor (java.awt.Color.BLUE);
         //follower1.setFillColor (java.awt.Color.BLUE);
         //follower2.setFillColor (java.awt.Color.BLUE);
      // public void mouseDragged (java.awt.event.MouseEvent e)
         //super.mouseDragged(e);
       }Not sure if mouseDragged method in last class should be the same as the 2nd class, last class isnt finished, got lost.

    sorry, but I have gotten this far in the Leader class. It complies but all three don't move when drag the one. Any help would and I would be grateful.
    import wheels.users.*;
    public class Leader extends DraggableSun
       private DraggableSun _sun;
       private DraggableSun _sun1;
       private java.awt.Point _lastMousePosition;
       public Leader(int x, int y, MovableSun follower1, MovableSun follower2)
         super(x,y);
         this._sun = _sun;
         this._sun1 = _sun1;
       public void mousePressed (java.awt.event.MouseEvent e)
         super.mousePressed (e);
         this.setFillColor (java.awt.Color.BLUE);
         _sun.setFillColor (java.awt.Color.BLUE);
         _sun1.setFillColor (java.awt.Color.BLUE);
       public void mouseDragged (java.awt.event.MouseEvent e)
         super.mouseDragged(e);
         java.awt.Point currentPoint;
            int diffX, diffY;
            currentPoint = e.getPoint ();
            diffX = currentPoint.x - _lastMousePosition.x;
            diffY = currentPoint.y - _lastMousePosition.y;
            this.setLocation
             this.getXLocation() + diffX,
             this.getYLocation() + diffY
         _sun.setLocation
               _sun.getXLocation() + diffX,
            _sun.getYLocation() + diffY
            _sun1.setLocation
               _sun1.getXLocation() + diffX,
               _sun1.getYLocation() + diffY
         _lastMousePosition = currentPoint;
       }

  • Cryptography: strange msdn sample code, help please....

    Apparently that line of code does nothing, to continue the discussion
    I would like to know your guys opinion of MS and the level of security they provide, I assumed everything was top-notch, but looking through their usage of their own libraries it appears they are incompetent.
    Can I get some opinions on this, I have updated the question to a discussion
    ORIGINAL QUESTION - EVERYTHING BELOW (irrelevant):
    I have been able to create a complete class for network server and client TCP/IP unlimited secure data transmission using RSA/AES (.NET framework cryptography only), and am implementing an EC/DH version  (.NET framework cryptography only). Everything
    is working ok, I was just curious: on the VB example on this page:
    https://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdiffiehellmancng.aspx
    What is the purpose of this line:
    Dim k As CngKey = CngKey.Import(bob.bobPublicKey, CngKeyBlobFormat.EccPublicBlob)
    On this page in the VB example??
    EDIT reason: forum bug correction
    EDIT2: I have noticed that the people writing the msdn samples do not understand the underlying cryptography, mostly based on their naming of variables. For the most part their usage follows the federal standards. Should I be worried that MS might not be
    properly implementing the .NET cryptography algorithms?

    You have completed the class and everything seems fine, you sent several GB of data through the class and it appears to be as secure as the RSA version. However, you found a line in a sample that isn't needed so you are concerned that they may be incompetent
    and the .NET crypto libraries may not be secure. Is that an accurate description ?
    I listed a single example, I have found dozens of them - including many examples which break the security rules and no information is given that it is doing such.
    Did you have any opinion or you just want to stir up arguments???
    I think the code is fine. I programmed a windows phone application myself and the samples are okay but most of the Microsoft samples are starter points and in some they clearly state that and not to use the code in production machines (if you have not noticed
    that in the MSDN programmer documentation you probably are new to Microsoft programming or have only been programming a few years on their platforms). This excludes the GUI controls included with some of the samples for windows application which
    are expected to work. They are one of the few and only rare exceptions to this rule. vb.NET 0.0 is right Microsoft is slow sometimes to stay modern but the libraries are effective.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr
    BTW, COM is still a pain and the device drivers/kernel components are becoming better in Microsoft software but its a good progression right now.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to
    suffering - Yoda. Blog - http://www.computerprofessions.co.nr

  • Need some code help please

    I am trying to make a sun and planet with the planet orbiting the sun. It is all working but the complier is having a problem with the instance variable _ball in the programs.  Can anyone help me fix this, I think I'm almost there.
    public class MovingBall extends javax.swing.JPanel
        int X0 = 100, Y0 = 100;
        double X2, Y2;
        double r = 10;
        double a = 0;
        double da = .04;
        double ecc = 1;
        double TWOPI = 2 * Math.PI;
        private javax.swing.JPanel _panel;
        public MovingBall (java.awt.Color aColor, javax.swing.JPanel aPanel)
         super();
         _panel = aPanel;
         X2 = X0 + r * Math.cos(a);
         Y2 = Y0 + r * Math.sin(a);
         //this.setLocation(X2, Y2);
        public void move()
         a = a + da;
         a = a % TWOPI;
         X2 = X0 + r * ecc * Math.sin(a);
         Y2 = Y0 + r * ecc * Math.sin(a);
         //this.setLocation (X2, Y2);
        public boolean inFront()
         return (a <= Math.PI);
        public void SetCircle(int x, int y)
         X0 = x;
         Y0 = y;
         //ecc = 1.0 - (double)pct/100;
    public class MovingBallPanel extends javax.swing.JPanel implements Mover, Controller
        private final int INIT_X = 250;
        private final int INIT_Y = 200;
        private SmartEllipse _sun;
        private Sky _sky;
        private final int SUN_DIAMETER = 60;
        //private MovingBall _ball;
        private final int PLANET_DIAMETER = 35;
        private final int ORBIT_DIAMETER = 185;
        int _da = 1;
        int _ecc = 1;
        private final int INTERVAL = 100;
        private MoveTimer _timer;
        public MovingBallPanel()
         super();
         this.setBackground(java.awt.Color.BLACK);
         _sun = new SmartEllipse(java.awt.Color.YELLOW);
         _sun.setSize(SUN_DIAMETER, SUN_DIAMETER);
         _sun.setLocation(INIT_X - SUN_DIAMETER/2, INIT_Y - SUN_DIAMETER/2);
         //_ball = new MovingBall();
         //_ball.setCenter((INIT_X - PLANET_DIAMETER)/2, (INIT_Y - PLANET_DIAMETER)/2);
         //_ball.setAngleIncrement(_da);
         _sky = new Sky();
         _timer = new MoveTimer(INTERVAL, this);
         _timer.start();
        public void move()
            //_ball.move();
            this.repaint();
        public void go (boolean g)
         //if (g) _ball.setAngleIncrement(_da);
            //else _ball.setAngleIncrement(0);
        public void setSpeed(int degrees)
         _da = 2 * degrees;
         //_ball.setAngleIncrement(_da);
        public void setEccentricity(int pct)
         _ecc = pct;
         //_ball.setEccentricity(_ecc);
        public void paintComponent(java.awt.Graphics aBrush)
         super.paintComponent (aBrush);
         java.awt.Graphics2D betterBrush = (java.awt.Graphics2D) aBrush;
         _sky.paintSky(betterBrush);
         _sun.draw(betterBrush);
         _sun.fill(betterBrush);
         //_ball.fill(betterBrush);
    }I think only those classes affect the problem. Thanks.

    They all complie separately, but when I complie PlanetApp which creates the frame it has the problem. It says it can't find the symbol for ball for all the methods that I call with it, such as ball.setEccentricity(...) or _ball.fill(...).  Here is the PlanetApp class.  Thanks.
    public class PlanetApp extends javax.swing.JFrame
        ControlPanel _controlPanel;
        MovingBallPanel _movingBallPanel;
        public PlanetApp (String title)
         super(title);
         this.setSize(600,500);
         this.setBackground(java.awt.Color.BLACK);
         this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
         _movingBallPanel = new MovingBallPanel();
         _controlPanel = new ControlPanel(_movingBallPanel);
         this.add(_movingBallPanel, java.awt.BorderLayout.CENTER);
         this.add(_controlPanel, java.awt.BorderLayout.SOUTH);
         this.setVisible(true);
        public static void main (String [] args)
         PlanetApp app =  new PlanetApp("Lab 7");
    }

  • Need a little beginner code help, please

    How do I modify the following code so that a different button
    (like btnAbout) can use the same function?
    btnHome.addEventListener(MouseEvent.ROLL_OVER, over);
    btnHome.addEventListener(MouseEvent.ROLL_OUT, out);
    function over(event:MouseEvent)):void {
    btnHome.gotoAndPlay(2);
    function out(event:MouseEvent):void {
    btnHome.gotoAndPlay(7);
    }

    use the attach code option to display code in this forum:

  • My bluetooth keyboard (Macnus 3.0) is recognised by my iMac but will  not pair?  I have paired it with my iPad using code 8310 but it still will not pair with my iMac.  Can someone help please?

    My bluetooth keyboard (Macnus brand - bought recently in Thailand)(similar to Mac small keyboard) will pair with my iPad using code 8310,and is recognized by my iMac but will not pair?
    There are very scant instructions with the keyboard and no mention of any code (the code was prompted by my iPad).
    I have followed the instructions but it still will not pair with my iMac!
    Can anyone help please?
    My iMac is 20 inch  Mid 2007 OSX10.9.1 4GB RAM

    Hi All, thank you for you suggestions.  I have been unable to find any website for the maker, but have looked at several Thai/cambodian sites incl <http://www.buycoms.com/Article/8435/index.asp>  which mentions the keyboard being suitable for tablet or windows.  No mention of iMac!  although the box is branded to indicate Mac compatable.
    I'm thinking that maybe it just will not pair with an iMac.
    Ill keep looking for the maker website, which might come on later in the future? maybe?
    thanks again.

  • Windows phone error code 80188301,. please need help

    i am getting an error while updating my windows phone.  windows phone error code 80188301,.
    please need help

    Hi,
    If issue persists after using the solutions provided by Aman Raizada, then I would suggest you ask the question in Windows Phone support forum:
    http://www.windowsphone.com/en-US/how-to/wp-support
    Regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • What's wrong with my code? please help....

    when display button is clicked it must diplay the remarks but it didn't happen...
    what's wrong with my code? please help
    here is my code.....
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class Area extends Applet implements ItemListener,ActionListener
         {Label arlbl = new Label("AREA");
          Choice archc = new Choice();
          Label extlbl = new Label("EXPENDITURE TYPE");
          CheckboxGroup extchk = new CheckboxGroup();
              Checkbox fchk = new Checkbox("FOOD",extchk,true);
              Checkbox schk = new Checkbox("SHELTER",extchk,false);
              Checkbox echk = new Checkbox("EDUCATION",extchk,false);
              Checkbox uchk = new Checkbox("UTILITIES",extchk,false);
          Label exalbl = new Label("EXPENDITURE AMOUNT");
          TextField exatf = new TextField("",20);
          Label remlbl = new Label("REMARKS");
          TextField remtf = new TextField("",30);
          Button disbtn = new Button("DISPLAY");
          Button resbtn = new Button("RESET");
          String display;
          public void init()
              {add(arlbl);
               archc.add("MANILA");
               archc.add("MAKATI");
               archc.add("QUEZON");
               archc.add("PASAY");
               add(archc);
               archc.addItemListener(this);
               add(extlbl);
               add(fchk);
               fchk.addItemListener(this);
               add(schk);
               schk.addItemListener(this);     
               add(echk);
               echk.addItemListener(this);
               add(uchk);
               uchk.addItemListener(this);
               add(exalbl);
               add(exatf);
               add(remlbl);
               add(remtf);
               add(disbtn);
               disbtn.addActionListener(this);
               add(resbtn);
               resbtn.addActionListener(this);
         public void itemStateChanged(ItemEvent ex)
              {int n = archc.getSelectedIndex();
               if(n==0)
                   {if(fchk.getState())
                         {exatf.setText("10000.00");
                         display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("15000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("24000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("8500.00");
                        display = archc.getSelectedItem();
              if(n==1)
                   {if(fchk.getState())
                        {exatf.setText("5000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("11000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("7500.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("24000.00");
                        display = archc.getSelectedItem();
              if(n==2)
                   {if(fchk.getState())
                        {exatf.setText("13000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("7000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("27000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("6000.00");
                        display = archc.getSelectedItem();
              if(n==3)
                   {if(fchk.getState())
                        {exatf.setText("6000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("9000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("15000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("19000.00");
                        display = archc.getSelectedItem();
         public void actionPerformed(ActionEvent e)
              {if(e.getSource() == disbtn)
                    {String amtstr = exatf.getText();
                     int amt = Integer.parseInt(amtstr);
                        {if(amt > 8000)
                             {remtf.setText(display + " IS ABOVE BUDGET");
                        else
                             {remtf.setText(display + " IS BELOW BUDGET");
              if(e.getSource() == resbtn)
                   {archc.select(0);
                   fchk.setState(true);
                   schk.setState(false);
                   echk.setState(false);
                   uchk.setState(false);
                   exatf.setText("");
                   remtf.setText("");
    Edited by: lovely23 on Feb 28, 2009 11:24 PM

    Edit: thanks for cross-posting this question on another forum. I now see that I wasted my time trying to study your code in the java-forums to help you with an answer that had already been answered elsewhere (here). Do you realize that we are volunteers, that our time is as valuable as yours? Apparently not. Cross-post again and many here will not help you again. I know that I won't.

Maybe you are looking for

  • Problem in Bulk collect

    Hi , I have declared a cursor with bulk collect. I have to insert only 2 columns values from tableA to TableB. The number of columns in tableA and TableB are not equal. DECLARE CURSOR c1                                     IS SELECT COLUMN1,COLUMN2,C

  • Web Sharing, TimeMachine, and CFURL

    So I've been using web sharing under 10.5 for months. Yesterday, I decided to upgrade my harddrive. After making sure everything was saved under TimeMachine, I swapped in the new hard drive, did a system restore, went to sleep, and woke up to my new

  • Can I save or sync my favourites off my 1020?

    Hi guys I'm desperately trying to save all the bookmarks off my 1020 before it goes for repair. Does anyone know how I can do this?? Thanks in advance!

  • HT4236 how can i transfer my photo to iphone whith out removing old one?

    how can i transter my photo in iphone wuth out removing yhe old one?

  • Shortcuts for resize/feather adjusment brush do not work

    Good morning, I've got a Mac and I just installed Lightroom CC. I've tried to use the sortcuts you specify in your help guides: https://helpx.adobe.com/lightroom/help/keyboard-shortcuts.html#keys_for_working_in_the_dev elop_module I know it should be