Drawing area dimension

can somebody explain how to adjust the drawing area dimension in java?
I really need to know how does it work!
thanks

can somebody explain how to adjust the drawing area dimension in java?
I really need to know how does it work!
thanks

Similar Messages

  • How to make a drawing area in order to get a trajectory​?

    hello everyone
    for the project that I'm working on, I need to control an XY stage.
    In order to compute the trajectory of the stage, I have to make a drawing area where the operator would draw the trajectory. and then compute it and send it to the stage.
    the question is:
    how do I make a vector drawing area?
    I thought: at each click of the mouse, the VI takes the mouse coordinate and store it. and so, I get the vectors (with a litte mathematics). and to set the speed, a text prompt opens to ask for the speed. and the VI store it in a *.txt file witch I can read with my XY stage.
    big thx 2 U thanks for reading me so far. I hope you have answers or ideas for me.
    CHKDSK

    Hello CHKDSK,
    please open the example finder (Help/Find Examples) in Labview and search for mouse.
    With the example Basic Input Demo you are able to read out the actual mouse position.
    Use the right button boolean vaule to store the correct data.
    Kind regards,
    Elmar

  • "can't move objects because they would fall off the drawing area" Why?!

    Hi, I'm trying to move a pdf object exported from vectorworks and i get the following error message: "Can't move the objects. The following transformation would make some objects fall completely off the drawing area."
    It's not the first time this has happened to me but I usually find a way to get around it. I tried increasing the page size, pasting it into a new bigger document, am i missing something?
    thanks!

    The drawing area is the entire surface available for drawing, and is much larger than the artboard. There are probably objects or unlocked guides that run to the edge of the drawing area.
    Unlock all objects and layers, then select all. Turn on Show Bounding Box and zoom out. The edge of the bounding box show the edge of the selected objects Explore the perimeter and delete anything at the edges that's causing the problem.

  • How to find JPanel viewable or drawing area size

    hi,
    I have a two small question. First one is, I have a JPanel what I need is to find the viewable area size or the drawing size of the Panel. I don't want to get the size of the Title bar. All I need is how to find the actual drawing area not including the title bar. I know how to get the total size of the JPanel, I just needs to know how to get the drawing area size where you put your components. e.g. if the size of my Panel is (300,300) then it also includes the title bar and the border too. But I need to find or get only the area size where we actually put our components.
    Another question is how can I get the size of my Title bar means the width and height.
    I'll really appreciate for any help
    Thanks

    Er... what's wrong with panel.getSize()?

  • Scaling error of running off drawing area

    I am learning illustrator cs3 for the purpose of doing vehicle wraps at the sign shop I now work at.
    So...we have this cd of vehicle templates that according to their instructions you are to open the template in illustrator which will reveal templates of the vehicle you are wanting in 5 different views, being the passenger side, drivers side, rear, front and top views, all in one illustrator window. The templates are in 1/20 scale so the instructions state to scale the object 2000% and in theory you are looking at the object as if it is 100% the actual size. So my problem is...if I choose one of the smaller views like the back or front of the vehicle, I have no problem getting the 2000% scale, but when I attempt to scale one of the larger views like one of the sides or the top, it tells me "CAN'T SCALE THE OBJECTS. THE REQUESTED TRANSFORMATION WOULD MAKE THE SOME OBJECTS FALL COMPLETELY OFF THE DRAWING AREA".
    So I was hoping someone can tell me what I'm missing here. Again I am learning by trial and error, so I'm hoping I am just missing something simple here!!
    Thanks
    Roger

    Thanks for the fix, can confirm clearing guides worked for me. I realise that just prior to the problem arising, I had actually deleted some guides, but had been lazy and used my active direct selection tool. I guess this left some stray points laying about on an infinite artboard, or something!! I guess using the normal selection (v) tool is the way to do it without this kind of strange hassle
    Thanks again!

  • I am trying to copy a document and I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area."

    I am trying to make duplicate documents with minor adjustments to each and when I try to copy the artwork from one document and paste it into the new document I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area." Both documents are exactly the same size, res, color format etc. I even tried to drag and drop and get the same error message. Anyone know what I can do to resolve this issue?

    Try scaling the view size down to 6% or so and then do a Select All. See if there are objects off the artboard which may be causing this error. Most often you will see this if there were guides dragged from a ruler which were selected by dragging the white arrow and then deleted. This leaves the anchor points at the edge of the work area.

  • Getting a JFrame Drawing Area

    hello all,
    I'm having a little trouble navigating the JDK help to find an answer to this problem, so I was hoping someone else could help?
    I've got a trivial JFrame based application, and I'm doing some 2D based work (drawing bitmaps etc..), but I can't get the client drawing area. Ie, the 0,0 coordinate on my window is underneath the title bar/caption bar. Drawing an image here means I lose about 30px..
    My temporary solution is to shift everything down by 30px, but this is not a robust solution for a cross platform application.
    I know that under C++/Win32 you can get the client sizes of the caption bars... but how do I do this in Java/Swing?
    Any ideas/hints?
    cheers,
    Jack

    cheers, that did the trick.
    I was using the "paint(Graphics g)" prototype, presuming that the [in] was the correct graphics context... obviously not :)
    Jack

  • Objects will fall completely off the drawing area

    I'm trying to save a graphic but keep getting the error "Can't save the illustration, the requested transformation would cause some objects to completely fall off the drawing area" or some such.
    I've double- and triple-checked the layout, and there are no elements off the drawing area. Every element in the graphic is inside the document setup boundaries of 186" x 90". What gives?
    CS3, XP Pro

    Hiya
    Nope, there were no guides used and the clean up paths thing didn't help either.
    I can get the file to save as an AI file, but if I try to save it as a CS2 EPS (required for the RIP), I get the error. Haven't tried CS3 EPS yet.

  • What are dimensions of PR68-68F connectors?

    I need to get a DAQ cable into my temp chamber. The connector on the shielded cables are too large to fit
    in port of the temp chamber so I was thinking about using a PR68-68F. What are the connector's dimensions?

    Hello pfecteau,
    I was able to find a drawing for this and I attached it below. I hope this is helpful!
    Regards,
    Russell
    Applications Engineer
    National Instruments
    http://www.ni.com/support
    Attachments:
    Drawing_PR68-68.zip ‏37 KB

  • Where are dimension attributes in AWM - cube viewer?

    Hi -
    Built my first cube and I am looking at the data with AWM's cube viewer.
    I can drill down a hierarchy, but I cannot get at the attributes that were created for the product dimension. The attributes were defined at all levels of the hierarchy.
    Does the AWM cube viewer allow you to access the attributes of a dimension?
    Thanks,
    Frank.

    Attribute is something related to dimension. They are purely the property of the dimension and not the fact. Now you said the data is not visible in the cube and you are getting 0.00 even with a simplier case(one dimensional cube). There are many causes of the value not shown in the cube and some are mentioned below
    1. All records are rejcted in the cube maintaince process. For this you can check olapsys.xml_log_log table and see if you can find any rejected records.
    2. There is some breakage in the hierarchy of the dimension. It also prevents data from summing up.
    Did you tried with the global sample available on OTN? That should be good starting point for you.
    You can check the cube as below to find out it is loaded or not. Consider your one dimensional cube. Find out a member which is existing in the dimension and also has some fact value associated with it.
    1. Now limit your dimension to that value like this
    lmt <dim name> to '<value>'
    For compressed composite cube
    2. Now check data in the cube like this
    rpr cubename_prt_topvar
    for uncompressed cube you should do
    rpr cubename_stored
    #2 should show the same value which is available in the fact.
    Thanks,
    Brijesh

  • Creating a JPaneled Drawing Area

    How do I go about getting a JPanel to the point where I can draw stuff on it?
    My software is totally Swing, so is it possible for me to use Canvas?
    When answering please give 1st priority to the initial question.
    Thx!
    Also, I have enabled it, made it visible, but I don't see it. And yes, I have added it to the frame [which shows]

    You subclass JPanel and override the paintComponent method. In this method, you draw on to the panel to yoyr satisfaction. (By the way, this approach works for any Swing component. Panels are preferred.) As for your second question, panels are a transparent tool for organising UI components and for painting on.
    Stephen

  • Increasing drawing area

    I am drawing up a design for a mini bus. I have the outlines, but it is just too big for illustrator to handle 'items will fall off the drawing board' AH!
    I don't really want to scale anything up or down, I want to work full size. Is there a plug in? Or way to turn that bit off?! I have used Flexi before but its rubbish using a partition such as Parallels. This has been the bane of my design career for a long time!
    Thank you in advance - if anyone can help I will be so SO SO happpyyyyyyy!!!

    OK, next question then...How do you scale something down, then back up again? I have imported the vehicle outlines, which are actually 'off' the artboard but can't do anything with it/move it/add graphics etc - so How can I scale it down and then back up again? I do printing too (outsource it) but never worked on a scale basis before.
    Cheers muchly

  • I can't open CS5 in windows 7 it tells me "Programm is locked or you are not legitimated". Bridge and Camera draw are working ok

    I can't open CS5 in Windows 7. It tells me "application is locked or you don't have legitimation". Bridge and Camera Raw are OK.

    Hi,
         thank you for your answer.
         The original Text photoshop showing me is the following:
         Konnte ein Arbeitsvolumen nicht öffnen, weil die Datei gesperrt ist
    oder Sie keine ausreichende Berechtigung haben. Heben Sie den Schutz
    der Datei mit Hilfe des Befehls 'Eigenschaften' im Windows Explorer
    auf.
         Sorry I can tell you this only in German. 
         After Installation the Version 64 Bit couldn't work because of this
    sentence (Windows 7 has 64 Bit Version). The 32 Bit Version worked
    without problems. The next day both versions didn't work because of
    this Informatiom. Bridge and Camera raw workinjg perfect but photoshop
    (CS 5) is blocked.

  • Please help. New CS 4 error: can't move the objects. the requested transformation would make some objects fall completely off the drawing area.

    I know this is not a "new" error message, but I have never gotten it on any previous version of Illustrator. I just upgraded to CS 4 and now get it on virtually every file when I try to nudge an object in any direction. Not that it should matter, but these are files that were created in earlier versions of Illustrator and I never had this problem. I have followed instructions from similar posts to no avail. I have zoomed way out to the edge of the art board: there are no hidden layers, objects, or guidelines, no lingering points from erased guidelines, or objects of any sort anywhere near the edge of the art board (which, I know, is enormous compared to the size of my working 11 x 17 document.)
    What am I missing?
    Also, on occasion, when I CAN nudge an object (usually a JPG or PDF image that I placed in the document), the image just disappears. I think it is still "there" though I cannot see it. Any suggestions?

    I am nudging it by selecting the object and hitting the up, down, or side arrows. Dragging with the mouse works fine, but does not give me the precision I'm looking for. Dragging with the mouse also avoids the "disappearing PDF/JPG" problem.
    I don't know what plug-ins I have. Possibly none.
    I don't use clipping masks. But I did select one object (and then ultimately selected all objects) and went to clipping mask, the "release" function was not active, so I am assuming there are no clipping masks in the document.
    I did attempt to select stray points, nada.
    I have not tried getting rid of the settings folder. Not sure how to do that?
    Also not sure how to take a screen shot to show you. I can tell you that there is only one layer and it is a very simple document with just a JPG image, a few objects and some text.
    Sorry! I hope this helps you help me, I normally just use a few simple tools to produce some basic documents.

  • JRadioButton Event Handling Help???

    Hello everyone. I have been working on this program for a while now and it is just bugging me. It is a stoplight in which the lights are turned on by radio buttons. I have all the code but for some reason my radio buttons do not work. I have a listener and the actionperformed class defined and I just cannot figure out what is going on. Any help would be greatly appreciated.
    Thanks,
    Austin
    import java.awt.*;*
    *import java.awt.event.*;
    import javax.swing.*;*
    *class Lights extends JPanel*
    *public JRadioButton btnR;*
    *public JRadioButton btnY;*
    *public JRadioButton btnG;*
    *public JRadioButton btnO;*
    *public Color rColor;*
    *public Color yColor;*
    *public Color gColor;*
    *public Color general;*
    *public void paintComponent ( Graphics g)*
    *super.paintComponent ( g );*
    *general= getBackground();*
    *// Set foreground color*
    *g.setColor (Color.black);*
    *// get the size of the drawing area*
    *Dimension size = this.getSize();*
    *// Bounding rectangle for the traffic lights*
    *int rectWidth = (int) (0.4* size.width);
    int rectHeight = (int) (0.8 *size.height);*
    *// Location where the rectangle is to be drawn*
    *int xint = (int) (0.3* size.width);
    int yint = (int) (0.1 *size.height);*
    *// Draw bounding rectangle*
    *g.drawRect (xint, yint, rectWidth, rectHeight);*
    *// Draw three circles inside the rectangle*
    *int circleHeight = (int) (0.9* rectHeight / 3);
    int circleWidth = (int) (0.8 *rectWidth);*
    *int circleDia = (circleHeight < circleWidth)? circleHeight : circleWidth;*
    *int xOffset = (rectWidth - circleDia) / 2;*
    *int yOffset = (rectHeight - 3* circleDia) / 4;
    xint = xint +xOffset;+
    +yint = yint+ yOffset;
    // Draw the red light
    g.setColor(getBackground());
    g.setColor(rColor);
    g.fillOval (xint, yint, circleDia, circleDia);
    g.setColor(Color.black);
    g.drawOval (xint, yint, circleDia, circleDia);
    g.setColor(getBackground());
    rColor= general;
    // Draw the yellow light
    yint = yint +circleDia+ yOffset;
    g.setColor(yColor);
    g.fillOval (xint, yint, circleDia, circleDia);
    g.setColor(Color.black);
    g.drawOval (xint, yint, circleDia, circleDia);
    g.setColor(getBackground());
    yColor= general;
    // Draw the green light
    yint = yint +circleDia+ yOffset;
    g.setColor(gColor);
    g.fillOval (xint, yint, circleDia, circleDia);
    g.setColor(Color.black);
    g.drawOval (xint, yint, circleDia, circleDia);
    g.setColor(getBackground());
    gColor= general;
    public class TrafficLights
    public static void main (String[] args)
    Lights lightPanel = new Lights();
    lightPanel.setBorder ( BorderFactory.createEmptyBorder (10, 20, 10, 20 ));
    // Create buttons to simulate switches
    lightPanel.btnR = new JRadioButton ("Red");
    lightPanel.btnY = new JRadioButton ("Yellow");
    lightPanel.btnG = new JRadioButton ("Green");
    lightPanel.btnO = new JRadioButton ("Off");
    ButtonGroup switches = new ButtonGroup ();
    switches.add (lightPanel.btnR);
    switches.add (lightPanel.btnY);
    switches.add (lightPanel.btnG);
    switches.add (lightPanel.btnO);
    JPanel switchPanel = new JPanel();
    switchPanel.setBorder ( BorderFactory.createEmptyBorder (10, 20, 10, 20 ));
    switchPanel.setLayout (new GridLayout (1, 4));
    switchPanel.add (lightPanel.btnR);
    switchPanel.add (lightPanel.btnY);
    switchPanel.add (lightPanel.btnG);
    switchPanel.add (lightPanel.btnO);
    JFrame frame = new JFrame ("Traffic Lights");
    frame.getContentPane().add( lightPanel, BorderLayout.CENTER);
    frame.getContentPane().add( switchPanel, BorderLayout.SOUTH);
    frame.setSize (400, 600);
    frame.setVisible (true);
    frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
    class LightButtonListener implements ActionListener
    private Lights theLight;
    //public Color c;
    public LightButtonListener ( Lights aLight )
    theLight = aLight;
    //create listener and add buttons to it
    theLight.btnR.addActionListener ( this );
    theLight.btnY.addActionListener ( this );
    theLight.btnG.addActionListener ( this );
    theLight.btnO.addActionListener ( this );
    public void actionPerformed ( ActionEvent evt )
    if ( evt.getSource() == theLight.btnR)
    theLight.rColor= Color.red;
    theLight.repaint();
    else if (evt.getSource() == theLight.btnY)
    theLight.yColor= Color.yellow;
    theLight.repaint();
    else if (evt.getSource() == theLight.btnG)
    theLight.rColor= Color.green;
    theLight.repaint();
    else if (evt.getSource() == theLight.btnO)
    theLight.repaint();
    }

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Lights extends JPanel
      public JRadioButton btnR;
      public JRadioButton btnY;
      public JRadioButton btnG;
      public JRadioButton btnO;
      public Color rColor;
      public Color yColor;
      public Color gColor;
      public Color general;
      public void paintComponent ( Graphics g)
        super.paintComponent ( g );
        general= getBackground();
        // Set foreground color
        g.setColor (Color.black);
        // get the size of the drawing area          
        Dimension size = this.getSize();
        // Bounding rectangle for the traffic lights
        int rectWidth = (int) (0.4 * size.width);
        int rectHeight = (int) (0.8 * size.height);
        // Location where the rectangle is to be drawn
        int xint = (int) (0.3 * size.width);
        int yint = (int) (0.1 * size.height);
        // Draw bounding rectangle
        g.drawRect (xint, yint, rectWidth, rectHeight);
        // Draw three circles inside the rectangle
        int circleHeight = (int) (0.9 * rectHeight / 3);
        int circleWidth = (int) (0.8 * rectWidth);
        int circleDia = (circleHeight < circleWidth)? circleHeight : circleWidth;
        int xOffset = (rectWidth - circleDia) / 2;
        int yOffset = (rectHeight - 3 * circleDia) / 4;
        xint = xint + xOffset;
        yint = yint + yOffset;
        // Draw the red light
        g.setColor(getBackground());
        g.setColor(rColor);
        g.fillOval (xint, yint, circleDia, circleDia);
        g.setColor(Color.black);
        g.drawOval (xint, yint, circleDia, circleDia);
        g.setColor(getBackground());
        rColor= general;
        // Draw the yellow light
        yint = yint + circleDia + yOffset;
        g.setColor(yColor);
        g.fillOval (xint, yint, circleDia, circleDia);
        g.setColor(Color.black);
        g.drawOval (xint, yint, circleDia, circleDia);
        g.setColor(getBackground());
        yColor= general;
        // Draw the green light
        yint = yint + circleDia + yOffset;
        g.setColor(gColor);
        g.fillOval (xint, yint, circleDia, circleDia);
        g.setColor(Color.black);
        g.drawOval (xint, yint, circleDia, circleDia);
        g.setColor(getBackground());
        gColor= general;
    public class TrafficLights
      public static void main (String[] args)
         Lights lightPanel = new Lights();
         lightPanel.setBorder ( BorderFactory.createEmptyBorder (10, 20, 10, 20 ));
        // Create buttons to simulate switches
        lightPanel.btnR = new JRadioButton ("Red");
        lightPanel.btnY = new JRadioButton ("Yellow");
        lightPanel.btnG = new JRadioButton ("Green");
        lightPanel.btnO = new JRadioButton ("Off");
        ButtonGroup switches = new ButtonGroup ();
        switches.add (lightPanel.btnR);
        switches.add (lightPanel.btnY);
        switches.add (lightPanel.btnG);
        switches.add (lightPanel.btnO);
        JPanel switchPanel = new JPanel();
        switchPanel.setBorder ( BorderFactory.createEmptyBorder (10, 20, 10, 20 ));
        switchPanel.setLayout (new GridLayout (1, 4));
        switchPanel.add (lightPanel.btnR);
        switchPanel.add (lightPanel.btnY);
        switchPanel.add (lightPanel.btnG);
        switchPanel.add (lightPanel.btnO);
        JFrame frame = new JFrame ("Traffic Lights");
        frame.getContentPane().add( lightPanel, BorderLayout.CENTER);
        frame.getContentPane().add( switchPanel, BorderLayout.SOUTH);
        frame.setSize (400, 600);
        frame.setVisible (true);
        frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
    class LightButtonListener implements ActionListener
      private Lights theLight;
      //public Color c;
      public LightButtonListener ( Lights aLight )
        theLight = aLight;
        //create listener and add buttons to it
        theLight.btnR.addActionListener ( this );
        theLight.btnY.addActionListener ( this );
        theLight.btnG.addActionListener ( this );
        theLight.btnO.addActionListener ( this );
      public void actionPerformed ( ActionEvent evt )
        if ( evt.getSource() == theLight.btnR)
          theLight.rColor= Color.red;
          theLight.repaint();
        else if (evt.getSource() == theLight.btnY)
             theLight.yColor= Color.yellow;
            theLight.repaint();
        else if (evt.getSource() == theLight.btnG)
             theLight.rColor= Color.green;
            theLight.repaint();
        else if (evt.getSource() == theLight.btnO)
            theLight.repaint();
    }Edited by: CS313e on Mar 27, 2010 1:21 AM
    Edited by: CS313e on Mar 27, 2010 9:59 AM

Maybe you are looking for