Problem drawing circles and ellipses

I want my program to draw an ellipse and circle. As we all know, theyre different.
I used the drawOval() method in java.awt.Graphics to do this.
Here is the crucial lines of the code:
public void paintComponent(Graphics g)
          super.paintComponent(g);
          if(currentShape!=null)
               if (currentShape.shapeType()==RECTANGLE)
                    g.drawRect(currentShape.getStartingX(),currentShape.getStartingY(),currentShape.getLength(),currentShape.getWidth());
               else if (currentShape.shapeType()==ELLIPSE)
                    g.drawOval(currentShape.getStartingX(),currentShape.getStartingY(),currentShape.getLength(),currentShape.getWidth());
               else if (currentShape.shapeType()==CIRCLE)
                    g.drawOval(currentShape.getStartingX(),currentShape.getStartingY(),currentShape.getLength(),currentShape.getLength());
          if (shapeCount>0)
               for (int c=0;c<shapeCount;c++)
                    if (myShapes[c].shapeType()==RECTANGLE)
                         g.drawRect(myShapes[c].getStartingX(),myShapes[c].getStartingY(),myShapes[c].getLength(),myShapes[c].getWidth());     
                    else if (myShapes[c].shapeType()==ELLIPSE)
                         g.drawOval(myShapes[c].getStartingX(),myShapes[c].getStartingY(),myShapes[c].getLength(),myShapes[c].getWidth());     
                    else if (myShapes[c].shapeType()==CIRCLE)
                         g.drawOval(myShapes[c].getStartingX(),myShapes[c].getStartingY(),myShapes[c].getLength(),myShapes[c].getLength());     
     }I am bemused because, it doesn't work. When I try to draw the circle, it doesn't draw a circle but an ellipse but as you can see I set the length and height parameters of the cricle to the length!
here are my other codes, see for yourself.
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class DrawFrame extends JFrame
     JButton undo, clear;
     JComboBox colors, shapes;
     JCheckBox isFilled;
     JPanel top,bottom;
     JLabel statusBar;
     DrawPanel canvas;
     String shapeList[] = {"Rectangle","Ellipse","Circle","Triangle"};
     String colorList[] = {"Red","Orange","Yellow","Green","Blue","Violet"};
     public DrawFrame()
          super("Java Drawings");
          setLayout(new BorderLayout());
          top = new JPanel();
          top.setLayout(new FlowLayout());
          undo = new JButton("Undo");
          clear = new JButton("Clear");
          shapes = new JComboBox(shapeList);
          colors = new JComboBox(colorList);
          isFilled = new JCheckBox("Filled",true);     
          top.add(undo);
          top.add(clear);
          top.add(shapes);
          top.add(colors);
          top.add(isFilled);
          add(top,BorderLayout.NORTH);
          statusBar = new JLabel("Program Started");
          canvas = new DrawPanel(statusBar);
          add(canvas,BorderLayout.CENTER);
          bottom = new JPanel();
          statusBar = canvas.getStatusLabel();
          bottom.setLayout(new FlowLayout(FlowLayout.LEFT));
          bottom.add(statusBar);
          add(bottom,BorderLayout.SOUTH);
          //default settings
          canvas.setShapeType(0);
          eventHandler handler = new eventHandler();
          shapes.addActionListener(handler);
     private class eventHandler implements ActionListener
          public void actionPerformed(ActionEvent e)
               if(e.getSource()==shapes)
                    canvas.setShapeType(shapes.getSelectedIndex());
                    //System.out.println("Selected Index"+shapes.getSelectedIndex());
     public static void main(String args[])
          DrawFrame app = new DrawFrame();
          app.setSize(500,300);
          app.setVisible(true);
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseListener;
public class DrawPanel extends JPanel
     private int shapeCount;
     private int shapeType;
     private int currentColor;
     private boolean filledShape;
     public JLabel statusLabel;
     private Shape myShapes[]=new Shape[100];
     private Shape currentShape;
     private final int RECTANGLE=0,ELLIPSE=1,CIRCLE=2,TRIANGLE=3;
     private boolean draw=false;
     public DrawPanel(JLabel statusBar)
          shapeCount=0;
          statusLabel = statusBar;
          mausHandler mouseEventsHandler = new mausHandler();
          addMouseListener(mouseEventsHandler);
          addMouseMotionListener(mouseEventsHandler);
          setBackground(Color.white);
          setVisible(true);
     public void setShapeType(int shapeType)
          this.shapeType=shapeType;
     public void setCurrentColor()
     public void isFilledShape()
     public void clearLastShape()
          shapeCount--;
          repaint();
     public void clearDrawing()
          shapeCount=0;
          repaint();
     public JLabel getStatusLabel()
          return statusLabel;
     public void paintComponent(Graphics g)
          super.paintComponent(g);
          if(currentShape!=null)
               if (currentShape.shapeType()==RECTANGLE)
                    g.drawRect(currentShape.getStartingX(),currentShape.getStartingY(),currentShape.getLength(),currentShape.getWidth());
               else if (currentShape.shapeType()==ELLIPSE)
                    g.drawOval(currentShape.getStartingX(),currentShape.getStartingY(),currentShape.getLength(),currentShape.getWidth());
               else if (currentShape.shapeType()==CIRCLE)
                    g.drawOval(currentShape.getStartingX(),currentShape.getStartingY(),currentShape.getLength(),currentShape.getLength());
          if (shapeCount>0)
               for (int c=0;c<shapeCount;c++)
                    if (myShapes[c].shapeType()==RECTANGLE)
                         g.drawRect(myShapes[c].getStartingX(),myShapes[c].getStartingY(),myShapes[c].getLength(),myShapes[c].getWidth());     
                    else if (myShapes[c].shapeType()==ELLIPSE)
                         g.drawOval(myShapes[c].getStartingX(),myShapes[c].getStartingY(),myShapes[c].getLength(),myShapes[c].getWidth());     
                    else if (myShapes[c].shapeType()==CIRCLE)
                         g.drawOval(myShapes[c].getStartingX(),myShapes[c].getStartingY(),myShapes[c].getLength(),myShapes[c].getLength());     
     private class mausHandler implements MouseListener, MouseMotionListener
          public void mouseClicked(MouseEvent e)
          public void mouseEntered(MouseEvent e)
          public void mouseExited(MouseEvent e)
          public void mousePressed(MouseEvent e)
               statusLabel.setText("Pressed at ("+e.getX()+","+e.getY()+")");
               if (shapeType==RECTANGLE)
                    currentShape = new Square(e.getX(),e.getY());     
               else if (shapeType==ELLIPSE)
                    currentShape = new Circle(e.getX(),e.getY());     
                    System.out.println("Oval");
               else if (shapeType==CIRCLE)
                    currentShape = new Circle(e.getX(),e.getY());     
                    System.out.println("Circle");
          public void mouseDragged(MouseEvent e)
               statusLabel.setText("Dragged at ("+e.getX()+","+e.getY()+")");
               currentShape.setDimensions(e.getX() - currentShape.getStartingX(),e.getY() - currentShape.getStartingY());
               repaint();
          public void mouseReleased(MouseEvent e)
               statusLabel.setText("Released at ("+e.getX()+","+e.getY()+")");
               currentShape.setDimensions(e.getX() - currentShape.getStartingX(),e.getY() - currentShape.getStartingY());
               myShapes[shapeCount] = currentShape;
               shapeCount++;
               currentShape=null;
               repaint();
          public void mouseMoved(MouseEvent e)
               statusLabel.setText("("+e.getX()+","+e.getY()+")");
}

Here are my other classes btw:
import java.awt.Graphics;
public interface Shape
     public abstract double getArea();
     public abstract double getVolume();
     public abstract String getShape();
     public abstract int getLength();
     public abstract int getWidth();
     public abstract double getRadius();
     public abstract double getHeight();
     public abstract void setDimensions(int length, int width);
     public abstract String toString();
     public abstract int shapeType();
     public abstract int getStartingX();
     public abstract int getStartingY();
import java.awt.Graphics;
public class Square extends TwoDimShape
     public Square(int x,int y)
          super("Square",x,y);
     public void setDimensions(int length,int width)
          super.length = length;
          super.width = width;
     public double getArea()
          return super.getArea() + (super.getLength()*super.getWidth());
     public String toString()
          return String.format(super.toString()+"\nOrigin: ("+getStartingX()+","+getStartingY()+")"+"\nArea: "+getArea()+"\nLength: "+getLength()+"\nWidth: "+getWidth());
     public int shapeType()
          return 0;
import java.awt.Graphics;
public class TwoDimShape implements Shape
     protected String shape;
     protected int length;
     protected int width;
     protected double radius;
     protected int x;
     protected int y;
     public TwoDimShape(String shape, int x, int y)
          this.shape = shape;
          this.x=x;
          this.y=y;          
     public TwoDimShape(String shape, double radius)
          this.shape=shape;
          this.radius=radius;
     public void setDimensions(int length, int width)
          this.length=length;
          this.width=width;
     public int getStartingX()
          return x;
     public int getStartingY()
          return y;
     public String getShape()
          return shape;
     public int getLength()
          return length;
     public int getWidth()
          return width;
     public double getRadius()
          return radius;
     public double getHeight()
          return 0.0;
     public double getArea()
          return 0.0;
     public double getVolume()
          return 0.0;
     public String toString()
          return String.format(shape +" ,2D shape with Area: ");
     public int shapeType()
          return -1;
import java.awt.Graphics;
public class Circle extends TwoDimShape
     public Circle(int x,int y)
          super("Square",x,y);
     public void setDimensions(int length,int width)
          super.length = length;
          super.width = width;
     public double getArea()
          return super.getArea() + (super.getLength()/2)*(super.getWidth()/2)*Math.PI;
     public String toString()
          return String.format(super.toString()+"\nOrigin: ("+getStartingX()+","+getStartingY()+")"+"\nArea: "+getArea()+"\nLength: "+getLength()+"\nWidth: "+getWidth());
     public int shapeType()
          return 1;
}

Similar Messages

  • Can only draw circle and square in Illustrator CS5 and Photoshop CS5

    I am experiencing a strange bug that seems to be affecting both Photoshop CS5 and Illustrator CS5. In Illustrator, when I try to draw a rectangle or ellipse I can only draw circles and squares. Also I can't change the color of selected objects. When I try to change its fill nothing happens. I can also only drag objects on the 0, 45 and 90 degree angles. Also I can no longer select off an object by clicking on the artboard. When I click on the artboard nothing happens.
    Similarly in Photoshop I can only draw straight lines using the brush tool. The  marquee tool is also not functioning properly. When I try to use the marquee tool the marching ants form a square but when I release the mouse it selects a rectangular portion. Strangely if I use the marquee tool and make selection I can press the shift key and add to it but this second selection's marching ants are not square but are properly rectangular.
    Since the problem seems to be affecting both Illustrator and Photoshop I'm thinking it's probably some kind of system conflict or perhaps an application running in the background is affecting it. Also if I restart my mac the problem goes away. Unfortunately the problem eventually returns.
    Anyway I'm pretty sure most of the suggested fixes involve systematically going through all the programs running in the background and trying to determine which if any might be affecting Illustrator and Photoshop but I just thought I'd post something in case someone else had the problem or knew of any fixes.
    I'm running CS5 on a MBP.
    Thanks!

    Ok I figured out the problem. It was another application called teleport which lets you control 2 macs with one mouse. It requires a hot key and in my case that was the shift key. Even though it was running it was still affecting me. Had to quit it and restart. If you're having a similar problem I'd check to see you're not running any other applications that can be activated with a hot key.

  • Hi i would like help with:  When I draw circle and add stroke I can not see stroke  I use Photoshop CS 5

    Hi i would like help with:
    When I draw circle and add stroke I can not see stroke
    I use Photoshop CS 5

    Make sure the stroke is set to a color and not to the symbol that appears here for Fill

  • Drawing with a pencil = circles and rectangles

    When I am drawing with a pencil, the line looks like the shape I want to draw, but when I stop drawing, the shape reshapes to another shape whick looks like circles and rectangles = it does not look like the shape I wanted to draw. What is the problem?

    at the bottom of the tools panel click the pencil mode icon and choose ink or, use the brush tool if you want no adjustment to your drawing.

  • How to draw circle if I have two points info and radius of the circle?

    Hi,
    I am trying to draw circle.
    Inputs I have is 1. Two points of the circle and
    2. Radius of the circle.
    Please let me know if u have solution using Shape, Graphics2D apis.
    Thanks in advance..
    Cheers,
    Somasekhar

    As far as the drawing is concerned, you would use Graphics# drawOval. There's no API method to draw a circle using the parameters of two points and a radius.
    You need to solve the problem on paper and work out the maths involved, then translate that math into working Java code.
    btw, you do realize that the information will give you zero to two valid circles, don't you?
    db

  • How to draw a perfect circle and how to make sure it is perfectly centered inside a square

    How to draw a perfect circle and how to make sure it is perfectly centered inside a square in Photoshop elements using the Ellipse option.

    1. Create a square canvas.
    2. With the Elipse tool, hold down Shift (Shift forces a circle). Draw the circle anywhere on the canvas (Shape 1 in this example).
    3. Simplify the circle layer
    4. Ctrl-click the layer to select the circle.
    5. Copy the selection to the clipboard (Edit > Copy).
    6. Deselect the selection.
    7. Paste from the clipboard (Edit > Paste). The pasted circle (Layer 1) will be centered.
    8. Delete the original circle layer.
    NOTE: Step 6 is the key. This guarantees that the pasted circle will be centered.
    If you want a circle completely within a square you can simply draw and simplify a circle on any shape canvas. Ctlrl-click the circle to to select it and copy to the clipboard.
    Then do File > New from Clipboard. This creates the circle cropped to a square on transparent background.

  • My iphone came up with that timing circle and just turned off and did not come back on ? even when i charge it now it still wont turn on ,do you know the problem?

    my iphone came up with that timing circle and just turned off and did not come back on ? even when i charge it now it still wont turn on ,do you know the problem?

    If the battery was empty (and it may then take 10 to 15 minutes of charging before it will respond), then have you tried a reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds, after which the Apple logo should appear - you won't lose any content, it's the equivalent of a reboot.

  • Drawing a curved line using the pen tool, dragging the text cursor over the line but will only give me a small area to write in, in-between a circle and a circle with a cross in?

    Drawing a curved line using the pen tool, dragging the text cursor over the line but will only give me a small area to write in, in-between a circle and a circle with a cross in?

    If you change your tool to the "Direct Selection Tool" (A) then you should be able to adjust the area for you to type in...

  • Draw Circle tool

    I am currently working myself deeper in the techniques of drawing and painting with Photoshop and while drawing I always encounter one problem: Drawing a circle. There are several workarounds for that:
    * Select circle, Border1 and fill
    * Make a circle as a form and place
    * Make a circle as a brush and draw it
    * Make a circle with a pass and fill path with brush
    But all of these seem to me just like workarounds and hinder me in my workflow. My suggestion would be a more simple, more fluent way. Photoshop can draw lines vertical and horizontal to the screen, my suggestion is not very different. My proposition is:
    * Hold a desired hotkey (like q or something) over the complete operation
    * Click where the midpoint of the circle is supposed to be
    * Click and hold again in the desired radius and draw your circle.
    This would work like drawing a line, you just draw a circle. This would give the user full control over the brush with sensitivity. That would be first of all faster and more intuitive than all the listed ways of drawing a circle and as mentioned you wouldn't lose any control over your brushsensitivity and options, while you can just simulate pen pressure with path filling.
    Thats it for now, any comments or amendments are welcome.
    Simon Kopp
    Germany

    Ok, and how do you envision drawing an ellipse, a rectangle, a rounded rectangle, or any other shape with the current brush?
    Using down more buttons?
    That's why you receive workarounds, because your FR is not "doable" without taking care of the myriad of sub-requests that you did not envision...

  • Draw circles in swing..

    hello.
    I'm making a program that draws circles in a frame and has some buttons in another program.
    However, there are some stack overflow errors..
    help please~
    [error messages]
    Exception in thread "main" java.lang.StackOverflowError
    at java.util.Hashtable.get(Hashtable.java:336)
    at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:142)
    at javax.swing.UIDefaults.get(UIDefaults.java:130)
    at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
    at javax.swing.UIDefaults.getColor(UIDefaults.java:380)
    at javax.swing.UIManager.getColor(UIManager.java:590)
    at javax.swing.LookAndFeel.installColors(LookAndFeel.java:58)
    at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:92)
    at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:49)
    at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:39)
    at javax.swing.JComponent.setUI(JComponent.java:652)
    at javax.swing.JPanel.setUI(JPanel.java:131)
    at javax.swing.JPanel.updateUI(JPanel.java:104)
    at javax.swing.JPanel.<init>(JPanel.java:64)
    at javax.swing.JPanel.<init>(JPanel.java:87)
    at javax.swing.JPanel.<init>(JPanel.java:95)
    at DrawCircle.<init>(DrawCircle.java:7)
    at DrawCircle.<init>(DrawCircle.java:6)
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    public class GUI{
         DrawCircle circle = new DrawCircle(100,100,50);
         private JButton UpButton, DownButton, LeftButton, RightButton, IncreaseButton, DecreaseButton, InputButton;
         public void drawframe(){
                    final JFrame CircleFrame = new JFrame("Frame for Circle");
                    CircleFrame.getContentPane().add(circle);
                    CircleFrame.setSize(200,200);
              CircleFrame.setVisible(true);
              UpButton = new JButton("UP");
              UpButton.addActionListener(new ActionListener()     {
                   public void actionPerformed(ActionEvent e){
                                circle.up();
                                    if(circle.getY() - circle.getR() <= 0) {
                                        JOptionPane.showMessageDialog( CircleFrame, "Out of window");
                                        circle.setY(circle.getY() +10);
              RightButton = new JButton("RIGHT");
              RightButton.addActionListener(new ActionListener()     {
                   public void actionPerformed(ActionEvent e)     {
                                circle.right();
                                    if(circle.getX() + circle.getR() >= 500) {
                                        JOptionPane.showMessageDialog( CircleFrame, "Out of window");
                                        circle.setX(circle.getX() -10);
              LeftButton = new JButton("LEFT");
              LeftButton.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                                circle.left();
                                    if(circle.getX() - circle.getR() <= 0) {
                                        JOptionPane.showMessageDialog( CircleFrame, "Out of window");
                                        circle.setX(circle.getX() +10);
              DownButton = new JButton("DOWN");
              DownButton.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                                circle.down();
                                    System.out.println(circle.getY());
                                    if(circle.getY() + circle.getR() >= 500) {
                                        JOptionPane.showMessageDialog( CircleFrame, "Out of window");
                                        circle.setY(circle.getY() -10);
              IncreaseButton = new JButton("INCREASE");
              IncreaseButton.addActionListener(new ActionListener()     {
                   public void actionPerformed(ActionEvent e)     {
                                circle.increase();
                                    if(circle.getY() + circle.getR() >= 500) {
                                        JOptionPane.showMessageDialog( CircleFrame, "Out of window");
                                        circle.setR(circle.getR() -10);     
                                    } else if(circle.getX() + circle.getR() >= 500) {
                                        JOptionPane.showMessageDialog( CircleFrame, "Out of window");
              DecreaseButton = new JButton("decrease");
                        DecreaseButton.addActionListener(new ActionListener(){
                                public void actionPerformed(ActionEvent e)     {           
                                    circle.decrease();
              JPanel ButtonPanel = new JPanel();
              ButtonPanel.add(IncreaseButton);
              ButtonPanel.add(DecreaseButton);
              ButtonPanel.add(DownButton);
              ButtonPanel.add(LeftButton);
              ButtonPanel.add(RightButton);
              ButtonPanel.add(UpButton);
              ButtonPanel.setLayout(new BoxLayout(ButtonPanel, BoxLayout.Y_AXIS));
                    JFrame mainFrame = new JFrame("GUI for Circle Drawing");
              mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
                    mainFrame.add(ButtonPanel);
                    mainFrame.pack();
              mainFrame.setVisible(true);
         public static void main(String [] args)     {
              GUI intf = new GUI();
              intf.drawframe();
    }and the DrawCircle Class is
    import java.awt.*;
    import javax.swing.*;
    public class DrawCircle extends JPanel{
         private int x, y, r;
            DrawCircle circle = new DrawCircle(100, 100, 50);
         public DrawCircle( int x , int y , int r){
              this.x = x;
              this.y = y;
              this.r = r;
         public int getR(){
              return r;
         public int getX(){
              return x;
         public int getY(){
              return y;
         public void setX(int x)     {
              this.x = x;
                    repaint();
         public void setY(int y)     {
              this.y = y;
                    repaint();
         public void setR(int r)     {
              this.r = r;
                    repaint();
         public void paint(Graphics g){
              g.clearRect(0,0,400,400);
                    g.drawOval(x-r, y-r, r*2, r*2);
            public void up() {
              circle.setY(circle.getY() -10);
            public void down() {
                    circle.setY(circle.getY() +10);
            public void right() {
                    circle.setX(circle.getX() +10);
            public void left() {
                    circle.setX(circle.getX() -10);
            public void increase() {
                    circle.setR(circle.getR() +10);     
            public void decrease() {
                    circle.setR(circle.getR() -10);     
              

    The problem is that you're constructing a new DrawCircle each time you construct a new DrawCircle, resulting in infinite recursion causing a stack overflow.
    This line:DrawCircle circle = new DrawCircle(100, 100, 50);in your DrawCircle class is causing the problem, do you need it? Remove it and replace references to 'circle' in the class with 'this'.

  • Having a problem with drawImage() and dont know why...

    OK, I'm having some problems drawing my image onto the frame.. It will let me draw string, add components, etc.. but as soon as it come to trying to draw an image it just doesn't wanna..
    Here is my code:
    import java.awt.*;
    public class Messenger extends Frame {
         private boolean laidOut = false;
         private TextField words;
        private TextArea messages;
        private Button ip, port, nickname;
        public Messenger() {
             super();
             setLayout(null);
             //set layout font
             setFont(new Font("Helvetica", Font.PLAIN, 14));
             //set application icon
             Image icon =  Toolkit.getDefaultToolkit().getImage("data/dh002.uM");
             setIconImage((icon));
            //add components
            words = new TextField(30);
            add(words);
            messages = new TextArea("", 5, 20, TextArea.SCROLLBARS_VERTICAL_ONLY);
            add(messages);
            ip = new Button("IP Address");
            add(ip);
            port = new Button("Port");
            add(port);
            nickname = new Button("Nickname");
            add(nickname);
        public void paint(Graphics g) {
            if (!laidOut) {
                Insets insets = insets();
                //draw layout
                g.drawImage("data/dh003.uM", 0 + insets.left, 0 + insets.top);
                ip.reshape(5 + insets.left, 80 + insets.top, 100, 20);
                port.reshape(105 + insets.left, 80 + insets.top, 100, 20);
                nickname.reshape(205 + insets.left, 80 + insets.top, 100, 20);
                messages.reshape(5 + insets.left, 100 + insets.top, 485, 300);
                g.drawString("Type your message below:", 5 + insets.left, 425 + insets.top) ;
                words.reshape(5 + insets.left, 440 + insets.top, 485, 20);
                laidOut = true;
        public boolean handleEvent(Event e) {
            if (e.id == Event.WINDOW_DESTROY) {
                System.exit(0);
            return super.handleEvent(e);
        public static void main(String args[]) {
            Messenger window = new Messenger();
            Insets insets = window.insets();
              //init window..
            window.setTitle("Unrivaled Messenger");
            window.resize(500 + insets.left + insets.right,
                          500 + insets.top + insets.bottom);
            window.setBackground(SystemColor.control);
            window.show();
    }Im only new to Java, maybe I've left something out ? Any help will be much appreciated, thanks :)

    Thanks! Got the image to display now... but, next problem.. its a strange one, whenever the application is minimized or has something dragged/popup over the top of it, those sections of text/images disappear... anyone know a reason for this? im using the d.drawImage() like displayed in my code above.. this is the final code for my image..
    Image banner = null;
    try {
         banner = ImageIO.read(new File("data/dh003.uM"));
    } catch(IOException e) { }
    g.drawImage(banner,0 + insets.left, 0 + insets.top, this);and as for my text...
    g.setFont(new Font("Arial",1,14));
    g.drawString("Type your message below:", 5 + insets.left, 425 + insets.top);Thanks in advance!

  • Problem with Log and transfer using AVCHD

    Hello,
    I was wondering if I can get help. I use a Canon Vixia HF S200 and FCP Version 6.0.6
    I have produced projects on my MacBook Pro 2.33 Ghz Intel Core 2 using this process before with no problems in the past. This problem just started and I dont know what has changed. When I open the Log and Transfer (LT) window I can see and hear all my video from the AVCHD folder in my harddrive just fine, I can scrub with no prob.... But when I add clip to Queue I get an red circle with exclamation on my status.
    I have changed the settings on the preferences to Apple intermediate Codec and the audio to plain stereo.. no luck there, the video still will not transfer to my bin.
    I have made sure that the toggle Queue state was the little arrow instead of the paused icon...no luck there either... i got a message that says clip queued transferring but nothing is happening.
    I will appreciate your help!
    Also I didn't mean to tread jack earlier, please accept my apologies, if anybody saw that...

    OK!!!!! This seriously cost me 1 day of my life that I'll never get back!!! lol
    So I was able to bring the footage in on to Imovie...Yes, I was that desperate...deadlines do that!
    Edited the entire project there...kinda sucked...
    Then I had the bright idea that if I was able to bring the videos in to Imovie, on my local HD...than something may be wrong with my scratch disk that I use on FC...its a USB disk, specs =slow.
    So I changed the scratch disk and yes "Davi S" for good measure I also deleted the Pref files.
    So it working again...here I go editing on FC after I edited the entire project on Imovie...
    Thanks for all your help!

  • I have a iphone 4s that I am trying to syn. whenI look at Iphone content it shows music, but there is this symbol  A dotted circle and these will not play.please help asI am frustrated.

    I have a iPhone 4s that I am trying to syn. when I look at IPhone content it shows music, but there is this symbol  A dotted circle and these will not play. Please help as I am frustrated.

    Try restoring the iPhone to factory settings. If you are having difficult restoring, put the iPhone into Recovery Mode and see if that then works:
    http://support.apple.com/kb/ht1808
    If not, or if a restore to factory settings does not fix the problem, then your iPhone may have a hardware problem. You can only get the iPhone serviced by Apple in Canada, so you will have to take the iPhone there or send it to someone you know in Canada who can get the iPhone serviced and send it back to you. The only option for getting service in Pakistan would be to pay some unauthorized repair shop to attempt a repair, after which Apple will no longer provide any service even in Canada.
    Regards.

  • How do I rotate numbers in a circle and keep them up right like numbers on a clock face.

    Please can someone help me with my question.

    Draw a crircle. Cut it open. No fill, no stroke
    Draw a box and make a copy of it. The box needs to be big enough to hold the largest number.
    select all, make blend.
    set blend steps to the number of objects you need. The two original object will be stacked on top of each other, so you need an extra one.
    Make a copy so you can revert easily.
    depending on how you drew the circle you might need to revert the blend direction.
    Expand one of your blends.
    Ungroup.
    Delete the duplicate object.
    Select all the boxes on the circle and Type > Threaded text > make
    Type the numbers with a return as divider into the boxes. Format the text.

  • Problems between PE4 and 10

    I have a drawing that was resized to a certain length using PE4. I have now upgraded to PE10 and when I print the drawing , it prints 3-4 times  larger than what it should be. When I view the drawing, the ruler at the top of the screen shows it being the correct length and when I checked the deminsion in the resize box, it also has the correct length. Have I done something wrong or should I delete the drawing and start over from scratch?

    Could you be a little more specific please? Sorry, I am not a tech guy just a poor laymen.
    Date: Thu, 2 Aug 2012 20:30:55 -0600
    From: [email protected]
    To: [email protected]
    Subject: Problems between PE4 and 10
        Re: Problems between PE4 and 10
        created by photodrawken in Photoshop Elements - View the full discussion
    Check your PSE print settings, especially the DPI value in the "Print Quality". Ken
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4595437#4595437
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4595437#4595437. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • How to get free iWork, iPhoto on compatible devices bought after 1 Sept?

    Hi Guys, So, I just upgraded to iOS7 and one of the things I was looking forward to was having access to the iWork and iLife apps which Apple announced would be free on newly purchased devices. I bought a 32GB 5th gen iPod touch on Sunday (15th Septe

  • Upgrading from SOA Suite 11.1.1.3.0 to SOA Suite 11.1.1.4.0

    Hi All, While upgrading the IAU schema from 11.1.1.3.0 to IAU schema 11.1.1.4.0 it is giving me the error "upgrade unsuccessful". I saw the log files and there it is giving 'FileNotFoundException: /oracle/Middleware/oracle_common/common/sql/iau/upgra

  • ITunes Store - ERROR MESSAGE for the past 2 days

    I've been trying to access the iTunes Store to continue buying music and to redeem a few gift cards, but every time I click on "Redeem" or "Purchase", I receive this error message: "We could not complete your iTunes store Request. An unknown error oc

  • SAP - Cost Center Planning - Version 1

    Dear All Recently we have started to use the cost center planning through KP16 under plan version -1 However we are unable to down the plan data in excel with a cost center break up through KSBP report. We are not using any special ledger System is s

  • Small Help

    Hi, I am learning Java, how can i get today's date. using which command can i get. Balaji