Can we draw a RECTANGLE of  1.5 (fractional ) height ??

hi ,
I am designing an GUI for scollbar for list elements ( may vary from 1- 2000 elements ) .For a better designing option , i want to draw a rectangle of fractional hieght ( say 1.5 ).
can anyone tell me, is it possible to draw such a rectangle .

read the Graphics javadoc page and you will have your answer

Similar Messages

  • Can we draw a RECTANGLE of  1.5 (fractional ) height  in J2ME  ???

    hi ,
    I am designing an GUI for scollbar for list elements ( may vary from 1- 2000 elements ) .For a better designing option , i want to draw a rectangle of fractional hieght ( say 1.5 ).
    can anyone tell me, is it possible to draw such a rectangle .

    http://developers.sun.com/techtopics/mobility/midp/articles/s2dvg/index.html

  • How can we draw Round Rectangle Border

    how can we draw Round Rectangle Border for example, just like XP's Task Manager( under "performance tab" )

    HI,
    Check MacTopia's support area for Word. http://www.microsoft.com/mac/help.mspx?product=Word&app=4
    I would think you need graphics software for that....
    Carolyn

  • Photoshop CC: When I'm trying to draw a rectangle I can't fill it or create a stoke because there is a message telling me; "Could not complete your request because of a program error. What can I do?

    Photoshop CC: When I'm trying to draw a rectangle I can't fill it or create a stoke because there is a message telling me; "Could not complete your request because of a program error. What can I do?

    It is a mute point now. PSE12 finally failed to the point it locked up the MAC. I had to restore the MAC OS from backup to a point before the PSE12 update.
    The MAC now operates correctly and so does PSE12. I don't think I'll be updating PSE any time soon.

  • Can you define a specific size of a Drawing Markup rectangle?

    Hi all,
    I am using Acrobat X and have been asked to find an answer to a 'problem' someone is having.
    If you have a site plan of one's property and they submit it to me for comment (as a pdf file) can I draw a box to a specific size? Say I set the 'scale ratio' to what the drawing scale is, I go to 'comments' and from the 'Drawing Markups' pane I choose 'draw rectangle; square', I then draw a rectangle to represent a shed of a specific size. I can dimension how far the rectangle/shed is to be from the property lines and I can dimension the rectangle/shed but I have to play with stretching it to get it to my desired size based on the scale I set.
    My question; is there anyway, when I am drawing the box, to either specify an x by y size or see the lenghts of their sides once I pick a corner and start to drag the box to the other corner?
    If not, would there be a java script that could accomplish this task?
    Any help would be appreciated.
    Thanks in advance.
    Paul

    Thanks Sabian, I understand that Acrobat is not a vector drawing application and I have been using all those programs (illustrator, AutoCAD, CorelDRAW etc.) for the past 20+ years. It wouldn't seem too much to ask considering that I can set a scale to my page (in Acrobat) and I can get Acrobat to give me a dimension from point A to point B based on that said scale, so why couldn't I expect to put a rectangle markup based on that same scale?
    As for the right tool? We are a municipality that is trying to make it easier for the public to submit applications online. Those submissions are in the format of a PDF because it is unrealistic to assume the everyone in the public has access to or can afford a program like AutoCAD or illustrator. Likewise it is too COSTLY to have everyone in the city have say 'AutoCAD' or even 'illustrator' to view the application documents to markup and send back.
    I believe  In 1991, Adobe Systems co-founder John Warnock outlined a system called "Camelot"[3] that evolved into PDF (from Wikipedia) and it was a way to have an independent viewing format regardless of what software application created it. I truly believe that Acrobat for what it's initial intent was that it should incorporate some of these features as it only makes sense in an evolutionary sense. Not to be a 'drawing package' but in it's markup/comments palette to expand on them.
    So keep your comments to 'no at this time acrobat does not allow this type of functionality but who knows in the future' and don't treat me as though I don't know anything about anything. In my decades of using these applications I have seen them evolve to include more functions and do more then when the product was originally released.
    I will now go on and recommend that they seriously look at Bluebeam Revu as it is not only cheaper but it has a ton more functionality specifically designed for the needs as listed above working with PDF's (and bitmap images to boot). I was just wanting to cover all bases and give all programs a fair look.
    Thanks again for your intuitive insight.
    Paul

  • How can i creat several rectangles with one draw rect.vi

    how can i creat several rectangles with one draw rect.vi? thanks
    Solved!
    Go to Solution.

    You can call it in a for loop, with an array of the rectangle coordinates you want to draw. Is this what you mean?
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    rectangle.png ‏11 KB

  • Why rotated rectangle tool can't draw rotated ROI on image?

    I want to use the tool window to draw a rotated rectangle on image, but each time, it seems only draw a rectangle, it can't rotate. Don't know why?
    In Vision Assitant, if I use rotated rectangle tool, it will show like this:
    Using the cross lines in rectangle, I can rotate my ROI, it is OK.
    Run the sample code: C:\Users\Public\Documents\National Instruments\CVI\samples\Vision\2. Functions\Geometric Matching, change     imaqShowToolWindow (FALSE);
    to  imaqShowToolWindow (TRUE); 
    on line 93#. Compile then run. Seems I also can't rotate my ROI, don't know why?
    Please show me? Thank you. 

    Hi,
    You cannot perform action on an overlay. In order to achieve what you want to do, I suggest you to use the ROI property in an image property node. Then just pass your ROI coordinates, the ROI will be updated automatically whenever your coordinates changes. You can drag a ROI this is impossible with an overlay.
    Regards

  • Can I draw *.bmp, *.png in java.awt.canvas ?

    In paint method of my program, I get image from Toolkit like this:
    public class CanCanvas extends Canvas{
    //In loadImage method
    Toolkit.getDefaultToolkit().getImage(
                        getClass().getClassLoader().getResource(
                                  resource.getString("bg.jpg")));
    //.... In paint method
    if (image != null && image.size() > 0) {
                   for (int j = 0; j < image.size(); j++) {
                        Image image1 = (Image) image.elementAt(j);
                        Rectangle rectangle = (Rectangle) imgLocation.elementAt(j);
                        g.drawImage(image1, rectangle.x, offset + rectangle.y,
                                  rectangle.width, rectangle.height, null);
                        i = i <= rectangle.y + rectangle.height + 7 ? rectangle.y
                                  + rectangle.height + 7 : i;But there is something very strange, if my image is *.jpg or *.gif, it runs ok, otherwise -*.bmp, *.png-, it can't draw the image.
    Would anyone tell me why ? Is the reason java.awt.canvas ?
    Thanks in advance ^ ^

    If you'd bother to read the documentation of the methods you're using, you'd know:
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html#getImage(java.lang.String)
    Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.

  • 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.

  • Draw a rectangle on an image in an applet

    Hello
    I have an applet that has 3 buttons. Each of them creates an image, which is displayed on the screen. Now, I want to draw a rectangle on these images. Since I already have a paint method for displaying the images correctly, I would need a second paint method for the rectangle. (I can't put everything in the same paint() method, because I have an horrible resukt)
    Does anyone have an idea of a method that would be able to replace a paint method?
    Any help would be appreciated
    Thanks
    Philippe

    Have you thought about using one of your button to get the action done? You could use the Graphics method to create your object rectangle.
    Don't know if it would work but seems like a good idea to try.

  • Want to draw some rectangles inside a swing panel object

    HI,
    I want to draw some rectangles inside one JPanel object in swing. The JPanel object should also hold some buttons, labels, etc.. I can add simple buttons, label etc. easily to the panel object but how do I add graphics (like lines, rectangles) to it ??
    an immediate response would be highly appreciated!!

    I am not sure why you are talking about the rectangle.
    To repeat I fill in a bit of code (subject to compiler errors since I Do not have a machine where I can compile or test on at the moment):
      private class ColourCube extends JPanel 
         // The size of each rectangle with colour
         private static final int ROWS = 10;
         private static final int COLS = 10;
         // To store current selection
         private int selectedIndex[] = null;
         public ColourCube()
             addMouseListener( new MouseAdapter() {
                public void mouseReleased(MouseEvent me)
                   // Find the rectangle index by dividing
                   // x and y positions then set selectedIndex
                   // unless it is the same positions as previous
                   // then set it to be null
                   fireActionEvent();
         // needed listener methods for firing events
         public void addActionListener( ActionListener al)
            // add to list
         // remove etc....
         protected void fireActionEvent()
            // Construct action event
            // call actionPerformed( ae ) on all listeners
         public void paintComponent(Graphics g)
             // Depending on size and height of this component
             // calculate out colWidth and rowHeight
             // Loop and paint the rectangles in their different colours
             for(int i = 0; i < ROWS; i++)
                for(int j = 0; j < COLS; j++)
                   // set the colour to the graphics object here from the list of colours available
                   g.setColor( ... );
                   // Added a little bit extra to have some space between
                   // each rectangle
                   g.fillRect( i * rowHeight + 1, j * colWidth + 1, colWidth - 2, rowHeight - 2 );
             if( selectedIndex != null )
                // We have a selection, lets paint the selection
                g.setColor( Color.white ); // Selection colour
                // The index contains the row in index 0 and the col in index 1
                g.drawRect( selectedIndex[0] * rowHeight, selectedIndex[1] * colWidth, colWidth, rowHeight );
      }Lacking from the above component is lacking stuff like preferedSize.
    Now, all you do is instantiate the ColourChooser, add it to your applet iether by drag and drop if you have an WYSIWYG editor, or by hand if you are so inclined.
    Voila! A composite component appears, doing the stuff it needs to be doing.
    Regards,
    Peter Norell

  • HELP! Handles missing when I draw a rectangle?!

    HELP! The handles are missing when I draw a rectangle with the rectangle tool. So I can't transform it Both Bounding box and edges are set to be visible, so it's not that! Is it a bug in the latest version? I have never had trouble with that before!

    camras,
    I am afraid you have come across the Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks) or 10.10 (Yosemite). Hopefully, the bug will be fixed soon.
    So a switch to Mavericks or Yosemite with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool or the Free Transform Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587

  • Draw a rectangle from a flex app

    Hello,
    GRAND CHALLENGE (should be "hello world" that anyone should
    easily find):
    1) - a flex app with a button
    2) - when clicked the button draw the rectangle
    PROPOSED NON WORKING SOLUTION:
    draw.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>import DrawApp;</mx:Script>
    <mx:Script>
    <![CDATA[
    function drawNow():void{
    var myRectangle:DrawApp = new DrawApp();
    myCanvas.addChild(myRectangle.returnRectangle());
    ]]>
    </mx:Script>
    <mx:Canvas width="100%" height="100%"
    id="myCanvas"></mx:Canvas>
    <mx:Button label="draw"
    click="drawNow()"></mx:Button>
    </mx:Application>
    DrawApp.as:
    // ActionScript file
    package {
    import flash.display.*;
    class DrawApp extends Sprite
    public function DrawApp()
    //don't use the constructor anymore since it won't return
    the rectangle
    public function returnRectangle():Shape
    var rectAndCircle:Shape=new Shape();
    rectAndCircle.graphics.lineStyle(1);
    rectAndCircle.graphics.beginFill(0x0000FF,1);
    rectAndCircle.graphics.drawRect(125,0,550,575);
    rectAndCircle.graphics.endFill();
    return rectAndCircle;
    }//class
    }//package
    I've got an error "1034" (BTW as a bonus if anyone know how i
    can avoid to have the localized AS3 error messages so I can paste
    full error messages in English)
    CHALLENGE:
    Can someone show me how to make this wok before Silverlight2
    Beta get out?
    Thanks from francois who's mad trying to solve this "should
    be obvious hello world" for too long and who also discovered
    lately:
    - the lack of threads in AS3
    - the insane security policy around Flash Player (must
    install a proxy to access a public API...)
    - etc.
    Help please Oo

    Ok found the solution: needed to change the "Shape" object by
    a "UIComponent" object (don't know why).

  • Can you create a rectangle in acrobat pro

    Hi all
    So I wondered if you could draw a rectangle in your form and fill it with a colour and then put some text on top of the construct....
    Anyone know?
    Thanks
    George

    yes I do, but the process you describe does not work.
    Allow me to describe the steps and perhaps you can tell me what you do different:
    Tools > Forms > Edit > Add New Field > Text Field
    Position, Resize, Properties : Read Only; Appearance Fill Red
    now seconf text field
    still in edit form > Add New Field > Text Field
    Position this second text field over the first one
    Properties : Read Only .... now which property or object can I use to enter the instructions???

  • I want to draw rounded rectangle with dashed border

    Hello,
    I am working on flex 4.5 air 2.7 . And i want to draw rounded rectangle which has dashed border or solid border as per user's selection. Also rectangle can be rounded or simple. I am able to draw simple rectangle with dashed border. I want a solution for rounded rectangle.
    If anyone have any idea then post as soon as possible..
    Thanks
    Dhwani

    Good day!
    Could you please post a screenshot with the Layers Panel visible?
    Is the iten by any chance a Shape Layer and therefore does have a Vector Mask?
    Regards,
    Pfaffenbichler

Maybe you are looking for

  • MBP 2.4Ghz Penryn Magsafe LED light randomly on/off w/ sporadic charging

    I have one of the February 2008 MacBook Pro's with 2.4Ghz C2D. I have had this thing for only 5 days and have noticed that the charging behavior has been sporadic. Sometimes i plug in my MBP and the amber light illuminates to indicate charging, and 1

  • ITunes 10.2.1.1, Win 7 (64 bit) Crash when switching Music Videos

    This problem has been plaguing me on both my laptop and desktop machines since early iTunes 10 versions. Randomly iTunes will stop responding when it switches from one Music Video to another and can only be fixed by killing the process and restarting

  • IPhone no longer connects to my computer over local network through apps

    I've been trying to fix this for months. I've worked with technology and Apple computers for three years. I am by no means an expert but you can believe me when I say I've tried all the basics. I first noticed the problem using FullControl. I liked t

  • ITunes 6 with QuickTime 7.3 error 1603

    I have downloaded the above and when I try to install it I get this message sayin the installscript engine on this machine is older than the version required to run setup. If available please install the latest version of Isscript.msi, or contact you

  • Master detail form

    Hi team, I am trying to create a Master detail form. I have two tables artist_master, pk group_code Artist_detail pk group_code. I have linked it as foreign key to Artist_master I have used the wizard to create the form. In the report page when I cli