Adding shapes to a GUI

Hi all,
Im just starting out producing a GUI and im using netbeans to help me.
I need to add shapes to my GUI, just basic square, circle etc for now. I also need to show these shapes moving around the GUI, animated.
Firstly what is the best way to add these basic shapes to a jpanel and secondly how do i go out moving thse objects around the jpanel.
Thanks for your help

Puce,
Thanks for your help.
I have been through the 2d graphics tutorials and had a look at them but i am still having problems.
I want to add the shape to an existing jpanel on a GUI containing several jpanels.
I am unsure where the code for this goes as in the tutorial it just has a seperate class for a single panel which then seems to overide the paintcomponent method. Where would i do this in my single class for the whole GUI.
Thanks Again

Similar Messages

  • Adding link on SAP Gui logon page

    Hi All,
    I have the problem that I need to add a link on the SAP Gui logon page.
    Within the transaction SE61 I have added the general text ZLOGIN_SCREEN_INFO.
    When I click on the Insert Command I have the possibility to create a link but the char. format F4 list is empty and it does not accept the link creation without it being filled.
    Does anybody have an idear?
    Thank you for your help
    Soeren

    Hi Juan,
    When I click on the Insert Command I have the possibility to create a link but the char. format F4 list is empty and it does not accept the link creation without it being filled.
    Would you please comment on this ?
    I have also seen the only possibility... but same issue...
    Regards.
    Rajesh Narkhede

  • DNS adding entries via SA GUI

    I am configuring a new Intel Xserve with 10.5.2 ready to move data from my current 10.4.11 system
    I have added over 100 entries into DNS via the Server Admin GUI by hand.
    (I tried using the move the data files and then using the convert utility. It kept missing and corrupting data).
    I have added most of my records apart from a few A records and CNAMEs, however when I click on "add entry", there is no "new entry" created. In fact I cannot seem now to add any entries to DNS via GUI.
    The GUI is the preferred entry point as other colleagues may need to add to DNS in my absence.
    I have stopped DNS, restarted, rebooted the system.
    The following is in /var/log/system.log it is complaining about not having a nameserver, but it does.
    Any help would be appreciated.
    Apr 3 09:48:26 adminservices servermgrd[89]: servermgr_dns: Failed to save zone '(null)' because the zone does not have a nameserver.
    Apr 3 09:48:55: --- last message repeated 3 times ---
    Apr 3 09:48:55 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:52:30 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:53:00: --- last message repeated 1 time ---
    Apr 3 09:53:17 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:55:06 adminservices servermgrd[89]: servermgr_dns: Failed to save zone '(null)' because the zone does not have a nameserver.
    Apr 3 09:55:36: --- last message repeated 3 times ---
    Apr 3 09:56:24 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:57:08 adminservices servermgrd[89]: servermgr_dns: Failed to save zone '(null)' because the zone does not have a nameserver.
    Apr 3 09:57:15: --- last message repeated 3 times ---
    Apr 3 09:57:15 adminservices Server Admin[271]: * -[GroupTextField windowDidResignKey:]: unrecognized selector sent to instance 0x1000e130
    Apr 3 09:57:22: --- last message repeated 1 time ---
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eebd00) failed. *
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eedef0) failed. *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eebd00) failed. *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eedef0) failed. *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eebd00) failed. *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eedef0) failed. *
    Apr 3 10:05:43 adminservices com.apple.launchd[1] (0x416a30.Locum[22193]): Exited: Terminated
    Apr 3 10:32:57 adminservices sshd[22755]: USER_PROCESS: 22755 ttys000
    Apr 3 10:32:57 adminservices com.apple.launchd[1] (0x416cc0.sshd[22755]): Could not setup Mach task special port 9: (os/kern) no access

    Funny thing, we just upgraded our xserve from 10.3.9 to 10.4.11 and our DNS is having problems as well. Never has a problem before. Whines and complains that it doesn't know who "xserve" is and does not associate "xserve" with its local IP address.
    Maybe what will help you may help us.
    Ever since the upgrade, Windows file-sharing has gotten horribly gummy.

  • Adding Help to a GUI

    I'm a bit new at making GUI's in java. I need to add a help option in my GUI by having a question mark at the right top corner of the window that once clicked when you hover over certain areas in the GUI it will provide help. does anyone know a good place for me to start looking (it's hard to google for it) or give me some starting code?
    Thank you

    Do you want one in the title bar? If so forget it. While you can do it, it would be very hard to do. (1)
    Having a "help" button somewhere else on the window would be easy.
    It could be done by having an action listener changing the mouse cuser on the Window curser, most likely to a custom curser. Then adding mouse listeners to everything that can be "helped". Which consumes the event (so the action listener on buttons is not fired), removes itself from all that it had been added to, and opens the help window for the object picked.
    1) To change the title bar requires JNI, or making a Custom L&F, and having that be able to add a "help" button

  • Adding a condition in GUI

    I have a main GUI file which is like the test file and I have an AddwardenDialog file i need to get the value entered in theWardenRank from AddWardenDialog to use in my main GUI file to determine a condition relating to something else.
    So just want to know how I can copy this value from AddwardenDialog to main testing GUI file
              add (new JLabel("Enter Warden Rank:       "));
              theWardenRank = new JTextField(20) ;
              add (theWardenRank);Thankyou

    noone got any idea's of how to do this then? HELP lol
    I've got another problem as well adding a search method in GUI
    non GUI version
    Prison.java
    public void SearchPrisonersFOR(JTextArea displayArea)          {               for(Person nextPrisoner : thePersons)
                        if (nextPrisoner instanceof Prisoner)
                                  Prisoner p = (Prisoner) nextPrisoner;
                                       if (p.getPrisonerID().equals(id))
                                            displayArea.append("\n" + p);
    TestPrison.java
    //Search for Prisoner by ID               
                        case 6:
                             System.out.println("Enter ID to search");
                             id = kybd.next();
                             HMEssex.SearchPrisoners(id);
                             break;
                        }GUI
    SearchPrisonersDialog.java
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class SearchPrisonersDialog extends JDialog implements ActionListener
         private JButton ok;
         private JButton cancel ;
         private JTextField id;
         public SearchPrisonersDialog(String sTitle, JFrame owner)
              super (owner, sTitle, true);
              setLayout(new FlowLayout());
              setSize(400,250);
              add (new JLabel("Enter Prisoner ID to search for:    "));
              id = new JTextField(10) ;
              add (id);
              ok = new JButton("Search");
              ok.addActionListener(this);
              add(ok);
              cancel = new JButton("Cancel");
              cancel.addActionListener(this);     
              add(cancel);
         //public Prisoner getPrisoner()
              //return thePrisoner ;
         public void actionPerformed(ActionEvent e)
              if (e.getSource() == ok)
                   return id;
                   //SearchPrisonersFOR(id);
              else if (e.getSource() == cancel)
                  // data entry cancelled
                  id = null;
              dispose();
    }how do I add a method into Main GUI TestPrisonGUI.java, so that my search method will work
    2 problems to solve now
    Thankyou

  • About adding a textfield in gui

    i wanted to add a textfield in my gui using gridbaglayout manageer with other buttons but instead of textfield only a line appears on screen where as all the buttons appears well

    Post the code where you are laying out your components.

  • Adding A Pushbutton To GUI Status of Standard Program

    Hi,
    I need to add a pushbutton to the GUI status of one of the SAP standard programs, the system being <b>ECC 6.0</b>. One method which I tried was by copying the standard program as a Z program and then modifying the GUI status per my requirement. Although this works, one drawback in doing it this way was with the introduction of the new Enhancement Framework in ECC 6.0, the defined enhancements from the standard program were not copied to the Z program.
    I am looking for suggestions on how to add a pushbutton in the GUI status of the standard program using the enhancement concept. Please let me know the implications if any, while carrying out this change.
    Regards,
    Ravi Krishna

    GOTO Se41 Transaction ..
    one example :
    Standard Program : SAPLSLVC_FULLSCREEN
    Status : STANDARD_FULLSCREEN
    use ur program first and status and now click on copy status ...
    copy from standard to custom..

  • Adding shapes in Muse

    Hi all, how do I add shapes in Muse? for example, I need to create a circle and a triangle.

    A circle is very easy .... just make a square that is the same hieght and width.
    For example make a square 100px by 100px then add a border radius of 50px to all four corners.
    Here is a quick video I did creating the Android logo with nothing but Muse
    http://www.lawryk.com/my-adobe-blog/logo-creation-in-adobe-muse

  • Round Corners on Added Shapes

    cs5.5 does not correctly round corners on shapes that have been built with pathfinder. when will this be fixed?
    i just updated a cs4 job to cs5.5 and all the text boxes that were fine in the first case are now unusable in the second.

    This is a major complaint about the new Live Corner effects in CS5. Apparently, in order to accomplish the "live" part, it is no longer possible using corner effects to do a true semicircular side on a frame. You can still create these shapes using the pen tool or Pathfinder, though.

  • Overlay Images and Shapes on the same canvas

    The example copde below was taken from: http://math.hws.edu/eck/cs124/javanotes3/source/
    Is it possible to update the code so that images (jpg,gif) can be added as well as shapes?
    Any help with this is much appreciated.
        The ShapeDraw applet lets the user add small colored shapes to
        a drawing area and then drag them around.  The shapes are rectangles,
        ovals, and roundrects.  The user adds a shape to the canvas by
        clicking on a button.  The shape is added at the upper left corner
        of the canvas.  The color of the shape is given by the current
        setting of a pop-up menu.  The user can drag the shapes with the
        mouse.  Ordinarily, the shapes maintain a given back-to-front order.
        However, if the user shift-clicks on a shape, that shape will be
        brought to the front.
        A menu can be popped up on a shape (by right-clicking or performing
        some othe platform-dependent action).  This menu allows the user
        to change the size and color of a shape.  It is also possible to
        delete the shape and to bring it to the front.
        This file defines the applet class plus several other classes used
        by the applet, namely:  ShapeCanvas, Shape, RectShape, OvalShape,
        and RoundRectShape.
        David Eck
        July 28,  1998
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    import java.util.Vector;
    public class ShapeDrawWithMenu extends Applet {
       public void init() { 
            // Set up the applet's GUI.  It consists of a canvas, or drawing area,
            // plus a row of controls below the canvas.  The controls include three
            // buttons which are used to add shapes to the canvas and a Choice menu
            // that is used to select the color used for a shape when it is created.
            // The canvas is set as the "listener" for these controls so that it can
            // respond to the user's actions.  (The pop-up menu is created by the canvas.)
          setBackground(Color.lightGray);
          ShapeCanvas canvas = new ShapeCanvas();  // create the canvas
          Choice colorChoice = new Choice();  // color choice menu
          colorChoice.add("Red");
          colorChoice.add("Green");
          colorChoice.add("Blue");
          colorChoice.add("Cyan");
          colorChoice.add("Magenta");
          colorChoice.add("Yellow");
          colorChoice.add("Black");
          colorChoice.add("White");
          colorChoice.addItemListener(canvas);
          Button rectButton = new Button("Rect");    // buttons for adding shapes
          rectButton.addActionListener(canvas);
          Button ovalButton = new Button("Oval");
          ovalButton.addActionListener(canvas);
          Button roundRectButton = new Button("RoundRect");
          roundRectButton.addActionListener(canvas);
          Panel bottom = new Panel();   // a Panel to hold the control buttons
          bottom.setLayout(new GridLayout(1,4,3,3));
          bottom.add(rectButton);
          bottom.add(ovalButton);
          bottom.add(roundRectButton);
          bottom.add(colorChoice);
          setLayout(new BorderLayout(3,3));
          add("Center",canvas);              // add canvas and controls to the applet
          add("South",bottom);
       public Insets getInsets() {
            // Says how much space to leave between the edges of the applet and the
            // components in the applet.
          return new Insets(3,3,3,3);
    }  // end class ShapeDraw
    class ShapeCanvas extends Canvas implements ActionListener, ItemListener,
                                                MouseListener, MouseMotionListener {
          // This class represents a canvas that can display colored shapes and
          // let the user drag them around.  It uses an off-screen images to
          // make the dragging look as smooth as possible.  A pop-up menu is
          // added to the canvas that can be used to performa certain actions
          // on the shapes;
       Image offScreenCanvas = null;   // off-screen image used for double buffering
       Graphics offScreenGraphics;     // graphics context for drawing to offScreenCanvas
       Vector shapes = new Vector();   // holds a list of the shapes that are displayed on the canvas
       Color currentColor = Color.red; // current color; when a shape is created, this is its color
       ShapeCanvas() {
            // Constructor: set background color to white, set up listeners to respond to mouse actions,
            //              and set up the pop-up menu
          setBackground(Color.white);
          addMouseListener(this);
          addMouseMotionListener(this);
          popup = new PopupMenu();
          popup.add("Red");
          popup.add("Green");
          popup.add("Blue");
          popup.add("Cyan");
          popup.add("Magenta");
          popup.add("Yellow");
          popup.add("Black");
          popup.add("White");
          popup.addSeparator();
          popup.add("Big");
          popup.add("Medium");
          popup.add("Small");
          popup.addSeparator();
          popup.add("Delete");
          popup.add("Bring To Front");
          add(popup);
          popup.addActionListener(this);
       } // end construtor
       synchronized public void paint(Graphics g) {
            // In the paint method, everything is drawn to an off-screen canvas, and then
            // that canvas is copied onto the screen.
          makeOffScreenCanvas();
          g.drawImage(offScreenCanvas,0,0,this);
       public void update(Graphics g) {
            // Update method is called when canvas is to be redrawn.
            // Just call the paint method.
          paint(g);
       void makeOffScreenCanvas() {
             // Erase the off-screen canvas and redraw all the shapes in the list.
             // (First, if canvas has not yet been created, then create it.)
          if (offScreenCanvas == null) {
             offScreenCanvas = createImage(getSize().width,getSize().height);
             offScreenGraphics = offScreenCanvas.getGraphics();
          offScreenGraphics.setColor(getBackground());
          offScreenGraphics.fillRect(0,0,getSize().width,getSize().height);
          int top = shapes.size();
          for (int i = 0; i < top; i++) {
             Shape s = (Shape)shapes.elementAt(i);
             s.draw(offScreenGraphics);
       public void itemStateChanged(ItemEvent evt) {
              // This is called to respond to item events.  Such events
              // can only be sent by the color choice menu,
              // so respond by setting the current color according to
              // the selected item in that menu.
          Choice colorChoice = (Choice)evt.getItemSelectable();
          switch (colorChoice.getSelectedIndex()) {
             case 0: currentColor = Color.red;     break;
             case 1: currentColor = Color.green;   break;
             case 2: currentColor = Color.blue;    break;
             case 3: currentColor = Color.cyan;    break;
             case 4: currentColor = Color.magenta; break;
             case 5: currentColor = Color.yellow;  break;
             case 6: currentColor = Color.black;   break;
             case 7: currentColor = Color.white;   break;
       public void actionPerformed(ActionEvent evt) {
              // Called to respond to action events.  The three shape-adding
              // buttons have been set up to send action events to this canvas.
              // Respond by adding the appropriate shape to the canvas.  This
              // also be a command from a pop-up menu.
          String command = evt.getActionCommand();
          if (command.equals("Rect"))
             addShape(new RectShape());
          else if (command.equals("Oval"))
             addShape(new OvalShape());
          else if (command.equals("RoundRect"))
             addShape(new RoundRectShape());
          else
             doPopupMenuCommand(command);
       synchronized void addShape(Shape shape) {
              // Add the shape to the canvas, and set its size/position and color.
              // The shape is added at the top-left corner, with size 50-by-30.
              // Then redraw the canvas to show the newly added shape.
          shape.setColor(currentColor);
          shape.reshape(3,3,50,30);
          shapes.addElement(shape);
          repaint();
       // ------------ This rest of the class implements dragging and the pop-up menu ---------------------
       PopupMenu popup;
       Shape selectedShape = null;     // This is null unless a menu has been popped up on this shape.
       Shape draggedShape = null;      // This is null unless a shape has been selected for dragging.
       int prevDragX;  // During dragging, these record the x and y coordinates of the
       int prevDragY;  //    previous position of the mouse.
       Shape clickedShape(int x, int y) {
             // Find the frontmost shape at coordinates (x,y); return null if there is none.
          for ( int i = shapes.size() - 1; i >= 0; i-- ) {  // check shapes from front to back
             Shape s = (Shape)shapes.elementAt(i);
             if (s.containsPoint(x,y))
                return s;
          return null;
       void doPopupMenuCommand(String command) {
             // Handle a command from the pop-up menu.
          if (selectedShape == null)  // should be impossible
             return;
          if (command.equals("Red"))
             selectedShape.setColor(Color.red);
          else if (command.equals("Green"))
             selectedShape.setColor(Color.green);
          else if (command.equals("Blue"))
             selectedShape.setColor(Color.blue);
          else if (command.equals("Cyan"))
             selectedShape.setColor(Color.cyan);
          else if (command.equals("Magenta"))
             selectedShape.setColor(Color.magenta);
          else if (command.equals("Yellow"))
             selectedShape.setColor(Color.yellow);
          else if (command.equals("Black"))
             selectedShape.setColor(Color.black);
          else if (command.equals("White"))
             selectedShape.setColor(Color.white);
          else if (command.equals("Big"))
             selectedShape.resize(75,45);
          else if (command.equals("Medium"))
             selectedShape.resize(50,30);
          else if (command.equals("Small"))
             selectedShape.resize(25,15);
          else if (command.equals("Delete"))
             shapes.removeElement(selectedShape);
          else if (command.equals("Bring To Front")) {
             shapes.removeElement(selectedShape);
             shapes.addElement(selectedShape);
          repaint();
       synchronized public void mousePressed(MouseEvent evt) {
             // User has pressed the mouse.  Find the shape that the user has clicked on, if
             // any.  If there is a shape at the position when the mouse was clicked, then
             // start dragging it.  If the user was holding down the shift key, then bring
             // the dragged shape to the front, in front of all the other shapes.
          int x = evt.getX();  // x-coordinate of point where mouse was clicked
          int y = evt.getY();  // y-coordinate of point
          if (evt.isPopupTrigger()) {            // If this is a pop-up menu event that
             selectedShape = clickedShape(x,y);  // occurred over a shape, record which shape
             if (selectedShape != null)          // it is and show the menu.
                popup.show(this,x,y);
          else {
             draggedShape = clickedShape(x,y);
             if (draggedShape != null) {
                prevDragX = x;
                prevDragY = y;
                if (evt.isShiftDown()) {                 // Bring the shape to the front by moving it to
                   shapes.removeElement(draggedShape);  //       the end of the list of shapes.
                   shapes.addElement(draggedShape);
                   repaint();  // repaint canvas to show shape in front of other shapes
       synchronized public void mouseDragged(MouseEvent evt) {
              // User has moved the mouse.  Move the dragged shape by the same amount.
          if (draggedShape != null) {
             int x = evt.getX();
             int y = evt.getY();
             draggedShape.moveBy(x - prevDragX, y - prevDragY);
             prevDragX = x;
             prevDragY = y;
             repaint();      // redraw canvas to show shape in new position
       synchronized public void mouseReleased(MouseEvent evt) {
              // User has released the mouse.  Move the dragged shape, then set
              // shapeBeingDragged to null to indicate that dragging is over.
              // If the shape lies completely outside the canvas, remove it
              // from the list of shapes (since there is no way to ever move
              // it back onscreen).
          int x = evt.getX();
          int y = evt.getY();
          if (draggedShape != null) {
             draggedShape.moveBy(x - prevDragX, y - prevDragY);
             if ( draggedShape.left >= getSize().width || draggedShape.top >= getSize().height ||
                     draggedShape.left + draggedShape.width < 0 ||
                     draggedShape.top + draggedShape.height < 0 ) {  // shape is off-screen
                shapes.removeElement(draggedShape);  // remove shape from list of shapes
             draggedShape = null;
             repaint();
          else if (evt.isPopupTrigger()) {        // If this is a pop-up menu event that
             selectedShape = clickedShape(x,y);   // occurred over a shape, record the
             if (selectedShape != null)           // shape and show the menu.
                popup.show(this,x,y);
       public void mouseEntered(MouseEvent evt) { }   // Other methods required for MouseListener and
       public void mouseExited(MouseEvent evt) { }    //              MouseMotionListener interfaces.
       public void mouseMoved(MouseEvent evt) { }
       public void mouseClicked(MouseEvent evt) { }
    }  // end class ShapeCanvas
    abstract class Shape {
          // A class representing shapes that can be displayed on a ShapeCanvas.
          // The subclasses of this class represent particular types of shapes.
          // When a shape is first constucted, it has height and width zero
          // and a default color of white.
       int left, top;      // Position of top left corner of rectangle that bounds this shape.
       int width, height;  // Size of the bounding rectangle.
       Color color = Color.white;  // Color of this shape.
       void reshape(int left, int top, int width, int height) {
             // Set the position and size of this shape.
          this.left = left;
          this.top = top;
          this.width = width;
          this.height = height;
       void resize(int width,int height) {
             // Set the size without changing the position
          this.width = width;
          this.height = height;
       void moveTo(int x, int y) {
              // Move upper left corner to the point (x,y)
          this.left = x;
          this.top = y;
       void moveBy(int dx, int dy) {
              // Move the shape by dx pixels horizontally and dy pixels veritcally
              // (by changing the position of the top-left corner of the shape).
          left += dx;
          top += dy;
       void setColor(Color color) {
              // Set the color of this shape
          this.color = color;
       boolean containsPoint(int x, int y) {
             // Check whether the shape contains the point (x,y).
             // By default, this just checks whether (x,y) is inside the
             // rectangle that bounds the shape.  This method should be
             // overridden by a subclass if the default behaviour is not
             // appropriate for the subclass.
          if (x >= left && x < left+width && y >= top && y < top+height)
             return true;
          else
             return false;
       abstract void draw(Graphics g); 
             // Draw the shape in the graphics context g.
             // This must be overriden in any concrete subclass.
    }  // end of class Shape
    class RectShape extends Shape {
          // This class represents rectangle shapes.
       void draw(Graphics g) {
          g.setColor(color);
          g.fillRect(left,top,width,height);
          g.setColor(Color.black);
          g.drawRect(left,top,width,height);
    class OvalShape extends Shape {
           // This class represents oval shapes.
       void draw(Graphics g) {
          g.setColor(color);
          g.fillOval(left,top,width,height);
          g.setColor(Color.black);
          g.drawOval(left,top,width,height);
       boolean containsPoint(int x, int y) {
             // Check whether (x,y) is inside this oval, using the
             // mathematical equation of an ellipse.
          double rx = width/2.0;   // horizontal radius of ellipse
          double ry = height/2.0;  // vertical radius of ellipse
          double cx = left + rx;   // x-coord of center of ellipse
          double cy = top + ry;    // y-coord of center of ellipse
          if ( (ry*(x-cx))*(ry*(x-cx)) + (rx*(y-cy))*(rx*(y-cy)) <= rx*rx*ry*ry )
             return true;
          else
            return false;
    class RoundRectShape extends Shape {
           // This class represents rectangle shapes with rounded corners.
           // (Note that it uses the inherited version of the
           // containsPoint(x,y) method, even though that is not perfectly
           // accurate when (x,y) is near one of the corners.)
       void draw(Graphics g) {
          g.setColor(color);
          g.fillRoundRect(left,top,width,height,width/3,height/3);
          g.setColor(Color.black);
          g.drawRoundRect(left,top,width,height,width/3,height/3);
    }

    Manveer-Singh
    Please don't post in old threads that are long dead. When you have a question, please start a topic of your own. Feel free to provide a link to an old thread if relevant.
    I'm locking this 3 year old thread now.
    db
    edit You have earlier been advised not to post in old dead threads.
    [http://forums.sun.com/thread.jspa?threadID=354443]
    Continuing to ignore this advice will render your account liable to be blocked.
    Edited by: Darryl.Burke

  • How can I include, in the table of content, a title that I have put on a shape?

    Hello all,
    1. I have a table of content
    2. I have added shapes
    3. I wrote text (titles. subtitles) on the shapes
    4. They do not appear in the table of content.
    5. They only appear in the table of content if they are not on a shape.
    Pages 5.5.2
    Can you help?
    Law

    Hi Law,
    Text in a shape or a text box will not feature in the table of contents.
    To get a colour behind your titles, type them into your document (not a shape). Format as Heading or some other paragraph style the TOC will recognise.
    Select the title text and Format Panel > Text > Font > Gearwheel > Advanced Options.
    Choose Character Fill Color and choose a colour from the palette (left) or colour circle (right).
    Example Titles (all on the same page for a smaller screen shot).
    Chapter 3 (in a coloured Text Box or Shape) does not appear in the TOC:
    Hint for cheats :
    To give the titles a wider Character Fill Colour, add some Tab characters before and after.
    Regards,
    Ian.

  • Storing Shape Information IN a Table-Like Structure

    Hi All,
    I have a Program which displays shape (rectangle,oval,etc) in the panel which is enclosed in a frame.. shape can be dragged and dropped anywhere on panel... also one can delete shape... Now I Want To Store All The Exiting Shapes (as they are added on panel ) in some structure say a table, and alongwith it, i also want to store additional information about shape, say its location currently on panel, its present color, etc so that i can use this information later in the program... how do i do implement this ?? Plz Help Me.. It would be great if you include the changes in the source code itself...
    thanks
    Here is the source code :
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class ShapeDrawFrame extends javax.swing.JFrame {
        JCheckBoxMenuItem addLargeShapes;    
       JCheckBoxMenuItem addBorderedShapes; 
       JRadioButtonMenuItem red, green, blue,      
                            cyan, magenta, yellow, 
                            black, gray, white;  
       JPopupMenu popup;
        public ShapeDrawFrame() {
            super("Shape Draw");
            //initComponents();        
          ShapeCanvas canvas = new ShapeCanvas();
          setContentPane(canvas);
          /* Create the menu bar and the menus */
          JMenuBar menubar = new JMenuBar();
          setJMenuBar(menubar);
          JMenu addShapeMenu = new JMenu("Add");
          addShapeMenu.setMnemonic('A');
          menubar.add(addShapeMenu);
          JMenu shapeColorMenu = new JMenu("Color");
          shapeColorMenu.setMnemonic('C');
          menubar.add(shapeColorMenu);
          JMenu optionsMenu = new JMenu("Options");
          optionsMenu.setMnemonic('O');
          menubar.add(optionsMenu);
          /* Create menu items for adding shapes to the canvas,
             and add them to the "Add" menu.  The canvas serves
             as ActionListener for these menu items. */     
          JMenuItem rect = new JMenuItem("Rectangle");
          rect.setAccelerator( KeyStroke.getKeyStroke("ctrl R") );
          addShapeMenu.add(rect);
          rect.addActionListener(canvas);
          JMenuItem oval = new JMenuItem("Oval");
          oval.setAccelerator( KeyStroke.getKeyStroke("ctrl O") );
          addShapeMenu.add(oval);
          oval.addActionListener(canvas);
          JMenuItem roundrect = new JMenuItem("Round Rect");
          roundrect.setAccelerator( KeyStroke.getKeyStroke("ctrl D") );
          addShapeMenu.add(roundrect);
          roundrect.addActionListener(canvas);
          /* Create the JRadioButtonMenuItems that control the color
             of a newly added shape, and add them to the "Color"
             menu.  There is no ActionListener for these menu items.
             The canvas checks for the currently selected color when
             it adds a shape to the canvas.  A ButtonGroup is used
             to make sure that only one color is selected. */
          ButtonGroup colorGroup = new ButtonGroup();
          red = new JRadioButtonMenuItem("Red");
          shapeColorMenu.add(red);
          colorGroup.add(red);
          red.setSelected(true);
          green = new JRadioButtonMenuItem("Green");
          shapeColorMenu.add(green);
          colorGroup.add(green);
          blue = new JRadioButtonMenuItem("Blue");
          shapeColorMenu.add(blue);
          colorGroup.add(blue);
          cyan = new JRadioButtonMenuItem("Cyan");
          shapeColorMenu.add(cyan);
          colorGroup.add(cyan);
          magenta = new JRadioButtonMenuItem("Magenta");
          shapeColorMenu.add(magenta);
          colorGroup.add(magenta);
          yellow = new JRadioButtonMenuItem("Yellow");
          shapeColorMenu.add(yellow);
          colorGroup.add(yellow);
          black = new JRadioButtonMenuItem("Black");
          shapeColorMenu.add(black);
          colorGroup.add(black);
          gray = new JRadioButtonMenuItem("Gray");
          shapeColorMenu.add(gray);
          colorGroup.add(gray);
          white = new JRadioButtonMenuItem("White");
          shapeColorMenu.add(white);
          colorGroup.add(white);
          /* Create the "Clear" menu item, and add it to the
             "Options" menu.  The canvas will listen for events
             from this menu item. */
          JMenuItem clear = new JMenuItem("Clear");
          clear.setAccelerator( KeyStroke.getKeyStroke("ctrl C") );
          clear.addActionListener(canvas);
          optionsMenu.add(clear);
          optionsMenu.addSeparator();  // Add a separating line to the menu.
          /* Create the JCheckBoxMenuItems and add them to the Options
             menu.  There is no ActionListener for these items because
             the canvas class will check their state when it adds a
             new shape. */
          addLargeShapes = new JCheckBoxMenuItem("Add Large Shapes");
          addLargeShapes.setSelected(true);
          optionsMenu.add(addLargeShapes);
          addBorderedShapes = new JCheckBoxMenuItem("Add Shapes with Border");
          addBorderedShapes.setSelected(true);
          optionsMenu.add(addBorderedShapes);
          optionsMenu.addSeparator();
          /* Create a menu for background colors, and add it to the
             "Options" menu.  It will show up as a hierarchical sub-menu. */
          JMenu background = new JMenu("Background Color");
          optionsMenu.add(background);
          background.add("Red").addActionListener(canvas);
          background.add("Green").addActionListener(canvas);
          background.add("Blue").addActionListener(canvas);
          background.add("Cyan").addActionListener(canvas);
          background.add("Magenta").addActionListener(canvas);
          background.add("Yellow").addActionListener(canvas);
          background.add("Black").addActionListener(canvas);
          background.add("Gray").addActionListener(canvas);
          background.add("White").addActionListener(canvas);
          /* Create the pop-up menu and add commands for editing a
             shape.  This menu is not used until the user performs
             the pop-up trigger mouse gesture on a shape. */
          popup = new JPopupMenu();
          popup.add("Delete Shape").addActionListener(canvas);
          popup.add("Bring to Front").addActionListener(canvas);
          popup.addSeparator();
          popup.add("Make Large").addActionListener(canvas);
          popup.add("Make Small").addActionListener(canvas);
          popup.addSeparator();
          popup.add("Add Black Border").addActionListener(canvas);
          popup.add("Remove Black Border").addActionListener(canvas);
          popup.addSeparator();
          popup.add("Set Color to Red").addActionListener(canvas);
          popup.add("Set Color to Green").addActionListener(canvas);
          popup.add("Set Color to Blue").addActionListener(canvas);
          popup.add("Set Color to Cyan").addActionListener(canvas);
          popup.add("Set Color to Magenta").addActionListener(canvas);
          popup.add("Set Color to Yellow").addActionListener(canvas);
          popup.add("Set Color to Black").addActionListener(canvas);
          popup.add("Set Color to Gray").addActionListener(canvas);
          popup.add("Set Color to White").addActionListener(canvas);
          /* Set the "DefaultCloseOperation" for the frame.  This determines
             what happens when the user clicks the close box of the frame.
             It is set here so that System.exit() will be called to end
             the program when the user closes the window. */
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          /* Set the size and location of the frame, and make it visible. */
          setLocation(20,50);
          setSize(550,420);
          show();       
       class ShapeCanvas extends JPanel
                         implements ActionListener, MouseListener, MouseMotionListener {
             // This class represents a "canvas" that can display colored shapes and
             // let the user drag them around.  It uses an off-screen images to
             // make the dragging look as smooth as possible.
          ArrayList shapes = new ArrayList();
               // holds a list of the shapes that are displayed on the canvas
          ShapeCanvas() {
               // Constructor: set background color to white
               // set up listeners to respond to mouse actions
             setBackground(Color.white);
             addMouseListener(this);
             addMouseMotionListener(this);
          public void paintComponent(Graphics g) {
               // In the paint method, all the shapes in ArrayList are
               // copied onto the canvas.
             super.paintComponent(g);  // First, fill with background color.
             int top = shapes.size();
             for (int i = 0; i < top; i++) {
                Shape s = (Shape)shapes.get(i);
                s.draw(g);
          public void actionPerformed(ActionEvent evt) {
                 // Called to respond to action events from the
                 // menus or pop-up menu.
             String command = evt.getActionCommand();
             if (command.equals("Clear")) {
                shapes.clear(); // Remove all items from the ArrayList
                repaint();
             else if (command.equals("Rectangle"))
                addShape(new RectShape());
             else if (command.equals("Oval"))
                addShape(new OvalShape());
             else if (command.equals("Round Rect"))
                addShape(new RoundRectShape());
             else if (command.equals("Red"))
                setBackground(Color.red);
             else if (command.equals("Green"))
                setBackground(Color.green);
             else if (command.equals("Blue"))
                setBackground(Color.blue);
             else if (command.equals("Cyan"))
                setBackground(Color.cyan);
             else if (command.equals("Magenta"))
                setBackground(Color.magenta);
             else if (command.equals("Yellow"))
                setBackground(Color.yellow);
             else if (command.equals("Black"))
                setBackground(Color.black);
             else if (command.equals("Gray"))
                setBackground(Color.gray);
             else if (command.equals("White"))
                setBackground(Color.white);
             else if (clickedShape != null) {
                    // Process a command from the pop-up menu.
                if (command.equals("Delete Shape"))
                   shapes.remove(clickedShape);
                else if (command.equals("Bring to Front")) {
                   shapes.remove(clickedShape);
                   shapes.add(clickedShape); 
                else if (command.equals("Make Large"))
                   clickedShape.setSize(100,60);
                else if (command.equals("Make Small"))
                   clickedShape.setSize(50,30);
                else if (command.equals("Add Black Border"))
                   clickedShape.setDrawOutline(true);
                else if (command.equals("Remove Black Border"))
                   clickedShape.setDrawOutline(false);
                else if (command.equals("Set Color to Red"))
                   clickedShape.setColor(Color.red);
                else if (command.equals("Set Color to Green"))
                   clickedShape.setColor(Color.green);
                else if (command.equals("Set Color to Blue"))
                   clickedShape.setColor(Color.blue);
                else if (command.equals("Set Color to Cyan"))
                   clickedShape.setColor(Color.cyan);
                else if (command.equals("Set Color to Magenta"))
                   clickedShape.setColor(Color.magenta);
                else if (command.equals("Set Color to Yellow"))
                   clickedShape.setColor(Color.yellow);
                else if (command.equals("Set Color to Black"))
                   clickedShape.setColor(Color.black);
                else if (command.equals("Set Color to Gray"))
                   clickedShape.setColor(Color.gray);
                else if (command.equals("Set Color to White"))
                   clickedShape.setColor(Color.white);
                repaint();
          } // end actionPerformed()
          void addShape(Shape shape) {
                 // Add the shape to the canvas, and set its size, color
                 // and whether or not it should have a black border.  These
                 // properties are determined by looking at the states of
                 // various menu items.  The shape is added at the top-left
                 // corner of the canvas.
             if (red.isSelected())
                shape.setColor(Color.red);
             else if (blue.isSelected())
                shape.setColor(Color.blue);
             else if (green.isSelected())
                shape.setColor(Color.green);
             else if (cyan.isSelected())
                shape.setColor(Color.cyan);
             else if (magenta.isSelected())
                shape.setColor(Color.magenta);
             else if (yellow.isSelected())
                shape.setColor(Color.yellow);
             else if (black.isSelected())
                shape.setColor(Color.black);
             else if (white.isSelected())
                shape.setColor(Color.white);
             else
                shape.setColor(Color.gray);
             shape.setDrawOutline( addBorderedShapes.isSelected() );
             if (addLargeShapes.isSelected())
                shape.reshape(3,3,100,60);
             else
                shape.reshape(3,3,50,30);
             shapes.add(shape);
             repaint();
          } // end addShape()
          // -------------------- This rest of this class implements dragging ----------------------
          Shape clickedShape = null;  // This is the shape that the user clicks on.
                                      // It becomes the draggedShape is the user is
                                      // dragging, unless the user is invoking a
                                      // pop-up menu.  This variable is used in
                                      // actionPerformed() when a command from the
                                      // pop-up menu is processed.
          Shape draggedShape = null;  // This is null unless a shape is being dragged.
                                      // A non-null value is used as a signal that dragging
                                      // is in progress, as well as indicating which shape
                                      // is being dragged.
          int prevDragX;  // During dragging, these record the x and y coordinates of the
          int prevDragY;  //    previous position of the mouse.
          public void mousePressed(MouseEvent evt) {
                // User has pressed the mouse.  Find the shape that the user has clicked on, if
                // any.  If there is no shape at the position when the mouse was clicked, then
                // ignore this event.  If there is then one of three things will happen:
                // If the event is a pop-up trigger, then the pop-up menu is displayed, and
                // the user can select from the pop-up menu to edit the shape.  If the user was
                // holding down the shift key, then bring the clicked shape to the front, in
                // front of all the other shapes.  Otherwise, start dragging the shape.
             if (draggedShape != null) {
                  // A drag operation is already in progress, so ignore this click.
                  // This might happen if the user clicks a second mouse button before
                  // releasing the first one(?).
                return;
             int x = evt.getX();  // x-coordinate of point where mouse was clicked
             int y = evt.getY();  // y-coordinate of point
             clickedShape = null;  // This will be set to the clicked shape, if any.
             for ( int i = shapes.size() - 1; i >= 0; i-- ) { 
                    // Check shapes from front to back.
                Shape s = (Shape)shapes.get(i);
                if (s.containsPoint(x,y)) {
                   clickedShape = s;
                   break;
             if (clickedShape == null) {
                   // The user did not click on a shape.
                return;
             else if (evt.isPopupTrigger()) {
                  // The user wants to see the pop-up menu
                popup.show(this,x-10,y-2);
             else if (evt.isShiftDown()) {
                  // Bring the clicked shape to the front
                shapes.remove(clickedShape);
                shapes.add(clickedShape);
                repaint();
             else {
                  // Start dragging the shape.
                draggedShape = clickedShape;
                prevDragX = x;
                prevDragY = y;
          public void mouseDragged(MouseEvent evt) {
                 // User has moved the mouse.  Move the dragged shape by the same amount.
             if (draggedShape == null) {
                    // User did not click a shape.  There is nothing to do.
                return;
             int x = evt.getX();
             int y = evt.getY();
             draggedShape.moveBy(x - prevDragX, y - prevDragY);
             prevDragX = x;
             prevDragY = y;
             repaint();      // redraw canvas to show shape in new position
          public void mouseReleased(MouseEvent evt) {
                 // User has released the mouse.  Move the dragged shape, and set
                 // draggedShape to null to indicate that dragging is over.
                 // If the shape lies completely outside the canvas, remove it
                 // from the list of shapes (since there is no way to ever move
                 // it back on screen).  However, if the event is a popup trigger
                 // event, then show the popup menu instead.
             if (draggedShape == null) {
                   // User did not click on a shape. There is nothing to do.
                return;
             int x = evt.getX();
             int y = evt.getY();
             if (evt.isPopupTrigger()) {
                   // Check whether the user is trying to pop up a menu.
                   // (This should be checked in both the mousePressed() and
                   // mouseReleased() methods.)
                popup.show(this,x-10,y-2);
             else {
                draggedShape.moveBy(x - prevDragX, y - prevDragY);
                if ( draggedShape.left >= getSize().width || draggedShape.top >= getSize().height ||
                        draggedShape.left + draggedShape.width < 0 ||
                        draggedShape.top + draggedShape.height < 0 ) {  // shape is off-screen
                   shapes.remove(draggedShape);  // remove shape from list of shapes
                repaint();
             draggedShape = null;  // Dragging is finished.
          public void mouseEntered(MouseEvent evt) { }   // Other methods required for MouseListener and
          public void mouseExited(MouseEvent evt) { }    //              MouseMotionListener interfaces.
          public void mouseMoved(MouseEvent evt) { }
          public void mouseClicked(MouseEvent evt) { }
       }  // end class ShapeCanvas
       // ------- Nested class definitions for the abstract Shape class and three -----
       // -------------------- concrete subclasses of Shape. --------------------------
       static abstract class Shape {
             // A class representing shapes that can be displayed on a ShapeCanvas.
             // The subclasses of this class represent particular types of shapes.
             // When a shape is first constructed, it has height and width zero
             // and a default color of white.
          int left, top;      // Position of top left corner of rectangle that bounds this shape.
          int width, height;  // Size of the bounding rectangle.
          Color color = Color.white;  // Color of this shape.
          boolean drawOutline;  // If true, a black border is drawn on the shape
          void reshape(int left, int top, int width, int height) {
                // Set the position and size of this shape.
             this.left = left;
             this.top = top;
             this.width = width;
             this.height = height;
          void setSize(int width, int height) {
                // Set the size of this shape
             this.width = width;
             this.height = height;
          void moveBy(int dx, int dy) {
                 // Move the shape by dx pixels horizontally and dy pixels vertically
                 // (by changing the position of the top-left corner of the shape).
             left += dx;
             top += dy;
          void setColor(Color color) {
                 // Set the color of this shape
             this.color = color;
          void setDrawOutline(boolean draw) {
                 // If true, a black outline is drawn around this shape.
             drawOutline = draw;
          boolean containsPoint(int x, int y) {
                // Check whether the shape contains the point (x,y).
                // By default, this just checks whether (x,y) is inside the
                // rectangle that bounds the shape.  This method should be
                // overridden by a subclass if the default behavior is not
                // appropriate for the subclass.
             if (x >= left && x < left+width && y >= top && y < top+height)
                return true;
             else
                return false;
          abstract void draw(Graphics g); 
                // Draw the shape in the graphics context g.
                // This must be overridden in any concrete subclass.
       }  // end of class Shape
       static class RectShape extends Shape {
             // This class represents rectangle shapes.
          void draw(Graphics g) {
             g.setColor(color);
             g.fillRect(left,top,width,height);
             if (drawOutline) {
                g.setColor(Color.black);
                g.drawRect(left,top,width,height);
       static class OvalShape extends Shape {
              // This class represents oval shapes.
          void draw(Graphics g) {
             g.setColor(color);
             g.fillOval(left,top,width,height);
             if (drawOutline) {
                g.setColor(Color.black);
                g.drawOval(left,top,width,height);
          boolean containsPoint(int x, int y) {
                // Check whether (x,y) is inside this oval, using the
                // mathematical equation of an ellipse.
             double rx = width/2.0;   // horizontal radius of ellipse
             double ry = height/2.0;  // vertical radius of ellipse
             double cx = left + rx;   // x-coord of center of ellipse
             double cy = top + ry;    // y-coord of center of ellipse
             if ( (ry*(x-cx))*(ry*(x-cx)) + (rx*(y-cy))*(rx*(y-cy)) <= rx*rx*ry*ry )
                return true;
             else
               return false;
       static class RoundRectShape extends Shape {
              // This class represents rectangle shapes with rounded corners.
              // (Note that it uses the inherited version of the
              // containsPoint(x,y) method, even though that is not perfectly
              // accurate when (x,y) is near one of the corners.)
          void draw(Graphics g) {
             g.setColor(color);
             g.fillRoundRect(left,top,width,height,width/3,height/3);
             if (drawOutline) {
                g.setColor(Color.black);
                g.drawRoundRect(left,top,width,height,width/3,height/3);
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            pack();
        }// </editor-fold>                       
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new ShapeDrawFrame().setVisible(true);
        // Variables declaration - do not modify                    
        // End of variables declaration                  
    }

    Sure. In your original post, you had a sort of a design. The general idea was right. And then you asked us to implement it. Well, that's the wrong approach. You need to make the sort-of-a-design into a real design. Don't implement anything until you know what you are going to implement.

  • I can't see my shapes in Pages.

    Hi all, first post so be gentle !  I'm using Pages for the first time hoping to get away from the hateful MS Word but I've run into my first problem.  I have added shapes to the page but cannot see them.  If I get ready to print then I can see them on the preview window and if I get lucky and click on one of them then the handles appear but otherwise I'm just staring at a blank page.  Help !!!!!!!!

    Thanks for the reply but that's not it.  The shape has a border in black and fill in green and it's the only thing on the page.
    It's strange that it appears on the print preview page but I can't see it on the page.  Very frustrated as I'm trying to work on something when I have to arrange a number of shapes and it is impossible to do.........grrrrr.
    OK, it's stranger than that.  I added a shadow and that showed up and then changed the shape fill colour to a deep crimson and the shape shows up as a light blue ?? 
    Then I put a photo on the page and it's all washed out colours as well.....but the opacity is at 100% which I had thought might be the problem.  So it's as if Pages isn't displaying colours properly (but again does so perfectly when I go to print and it shows in the preview window)
    Very strange

  • Shape Tweening - simple tween doesn't work

    I'm thoroughly discouraged with Flash CS3 for the trouble I'm
    having with this simple shape tween. Please tell me it's my fault
    so that I can get this to work and not think that Flash is dumb.
    I'm going from a small circle with a 1 px stroke to a round
    cornered rectangle with the same stroke. It looked like it spun a
    little during the morph so I added shape hints. I tried a few
    different arrangements and none of them really worked. The most
    annoying thing is when it looks right no the FLA and then the
    export is working correctly - obviously some kind of program
    defect.
    Shape hints:
    - All four corners with A starting in the top left and
    continuing around counter clockwise.
    - All four sides with A starting on the left side and
    continuing around counter clockwise.
    - A on left side and B on right side.
    They all either still spun funny or completely disappeared
    during the morph.
    All the hints appeared green and yellow for all arrangements
    - no red hints.
    In the past I've arranged them in what I would think to be a
    random order with the hints appearing red and the dam thing would
    actually work.
    Just the fact that I have to screw around with shape hints
    for this simple tween is silly.
    Simple fix here?

    Thanks for reporting the issue. Please move the code in first
    frame to frame 2 as a workaround.

  • Question about Custom Shape Files from newbie to PS

    My husband bought me PS CS4 Extended. That said, I have never used PS at all. I have always used PSP. Please don't hate me!
    I have figured out that one loads actions and presets. OK, got that. The question I have is if I can have my Custom Shapes and Actions on a completely different partition? I ask this because there is not enough room on the partition for me to continue adding shapes and such to PS in the program itself. I am figuring that I can since I have tio load them into the program anyway, but am asking to be sure so that I don't screw anything up.
    Another question I have is if I am able to point PS to where all of my plugins are that I already have installed in PSP, which also happen to be on a different partition. In PSP all one has to do is to point the program to where they are and all is good and they can be used within said program. Does PS allow for this also? If not, do I have to re-install all of the plugins into the PS program itself? I just don't have that much room on the partition that my PS resides on because of all of the other pregrams that I have. Also, does everything I load into PS just stay loaded or do I have to reload each time I want to use that particular preset?
    I do hope that ya'll can understand my questions and thank you for any help in advance.

    the benefit of having the presets in the proper folders is that you can select them from the fly-out menus instead of having to search for them using the Load command so yes, you can have them wherever you want. I doubt though that you don't have enough disk space for them, for instance, all the actions that come with Photoshop take up about 200kb, the custom shapes are about 700kb but that's because they come in duplicates. And yes, all that you load up stays in Photoshop until you remove them, no need to reload them at program start. For plug-ins you have the option to set an additional plug-in folder by going to Edit->Preferences->Plug-ins, don't know about needing to install them though as i don't use any

Maybe you are looking for