Draw rectangle with rmi

Dear friends
I do I draw a simple square in rmi?
thanks

RuiAranhaJava wrote:
ejp...posting an interface doesn't help and I don't want no one to do my work...
The simple question is to draw a rectangle or circle in a frame...but one of the problems is that draw (Graphics g) is abstract and must be implemented in a abstract class (I can't even declare the function).
what I really need is a small example to understand how to do this... I really want to understand...
Thankssounds like you would be better off posting in the AWT or "new to java" forums. you are currently posting in the RMI forums which is for questions related to remote communication, not questions related to drawing rectangles. once you figure out how to draw a rectangle, if you still need some sort of remote communication help, i'd recommend reading some RMI tutorials. then, if you have a specific question related to remote communication in java, come back here and ask it.

Similar Messages

  • Draw Rectangle with red border and transparent center

    I need a little help on the rectangle object.  I need to draw a rectangle with a transparent middle and a red boarder with a thickness of 2:
    Code:
    private void InitializeRectangle(Rectangle rectangle, CellLayoutBox cellBox)
    rectangle.Fill = new SolidColorBrush(Colors.Transparent);
    rectangle.StrokeThickness = 1;
    rectangle.Width = cellBox.Width;
    rectangle.Height = cellBox.Height;
    Canvas.SetLeft(rectangle, cellBox.Left);
    Canvas.SetRight(rectangle, cellBox.Top);
    I know I am missing the mark here, but it I can't seem to get a rectangle with a transparent fill and stroke of a different color even if I change the Colors.Transparent to another color. Any help is appreciated.

    @katghoti,
    Thanks for sharing the result back to forum.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Draw rectangle with a double

    Hello When I draw a rectangle with
    g.drawRect(521,32,201,20);
    I have to use int for the length.
    Is it possible to draw a rectangle with a double like this
    g.drawRect(521,32,201,20.05);

    If you cast that int the int is 20 and not 20.05.
    I tried this.In terms of pixels, 20.05 is equivalent to 20...
    The value itself is only useful in double when doing computations like trigonometry or 3D.
    Whatever the type of values used, it will finally be converted to an int, so don't bother with this.

  • Draw rectangle with "X" in it?

    I need to draw some squares that look like filled checkboxes. Is there any way to do this without having to manually line up two diagonal lines inside a square?
    Thanks - JAY

    Some wingding fonts have boxes with checkmarks already
    I think that's what Tom is saying.
    when I make my text box with an X it is usually to match a font I'm using.

  • 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

  • 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

  • Spark - Drawing a rounded rectangle with 3-sided border?

    I am upgrading to the Spark theme, and I am trying to draw a rectangle, with a corner radius of 20, with a border on only the top, right, and bottom sides.
    Basically, I want it to dock flush left in my application and extend out in a rounded rectangle.
    But I Cannot figure out how I would draw this in SVG? Anyone done this yet?

    Ned,
    Thank you for your response.  I apologize for the delay in my own response.
    I was seeing distortion in x direction as well.
    I was able to solve my problem using 9-slice scaling.  I used the scale9Grid property.

  • Draw rectangle in plot

    How can i draw rectangle in graph
    with Component works++?

    Annotations were introduced to the C++/ActiveX graph in Measurement Studio 6.0. This is the best way to draw a rectangle.
    Details:
    CNiAnnotation:hape is a property of type CNiShape. CNiShape::Type is an enumeration, one value of which is CNiShape::Rectangle. Use CNiShape::XCoordinates and CNiShape::YCoordinates to specify the location and size of the rectangle. Use CNiAnnotation::CoordinateType to specify whether the coordinates of the rectangle are in axis units or in pixels relative to plot area or screen area.
    If you cannot upgrade to Measurement Studio 6.0, you could consider using 2 cursors as a workaround.
    David Rohacek
    National Instruments

  • Rectangles with colors

    <mx:Canvas id="b1" x="10" y="10" height="40" width="300" borderStyle="solid" borderColor="black"/>
    to add rectangles side by side inside this canvas i wrote the following code
    for(var i:int=b1.x;i<b1.x+b1.width;i=i+15)
                        var line1:UIComponent = new UIComponent();
                        var lineThickness1:Number = 1;
                        var lineColor1:Number = 0x000000;
                        var lineAlpha1:Number = 1;
                        line1.graphics.lineStyle(lineThickness1,lineColor1,lineAlpha1);
                        line1.graphics.moveTo(i,b1.y);
                        line1.graphics.drawRect(i,b1.y,15,b1.height);
                        this.addChild(line1);
    now I want to fill those rectangles with colored rectangles starting to ending
    i pass the units then units*15 will be calculated and the covered rectangles will be populated with colored rectangles for that i wrote the following code
                             var c:UIComponent = new UIComponent();
                            var xposstr:String = arr1.getItemAt(arr1.length).toString();
                            var xpos:int = parseInt(xposstr);
                           c.graphics.beginFill(0xFFCC00,1);
                            c.graphics.drawRect(xpos,0,numUnits*15,b1.height-2);
                            c.graphics.endFill();
                            b1.addChild(c);
                            arr1.addItem(c.x+numUnits*15);
    arr1 is the ArrayCollection
    but iam not getting the required output

    This code draws rectangle (random background color),
    var colors: Array = [0x0000FF, 0x00FF00, 0xFF0000, 0xFF00FF]
    for(var i: int = 0; i < b1.width; i = i + 15) {
         var lineThickness1:Number = 1;
         var lineColor1:Number = 0x000000;
         var lineAlpha1:Number = 1;
         var bgColor: uint = colors[Math.floor(Math.random() * colors.length)];
         var g: Graphics = b1.graphics;
         g.lineStyle(lineThickness1,lineColor1,lineAlpha1);
         g.beginFill(bgColor, 1.0);
         g.moveTo(i, 0);
         g.drawRect(i, 0, 15, b1.height - 1);
         g.endFill();

  • Rectangle with editable text

    Hi
    I am working on drawing applet, in which as soon as the user clicks and drags rectangle in canvas a pop up comes asking for some input by user.If the user drags the rectangle somewhere that input area should also move with it.
    Tht means I want editable rectangle.
    I don't know how to perform this and also I don't have to use javascript.
    Kindly guide me for the same.
    Thanks

    Thnx for the reply.
    Till now what I have come to know is that basically I need to use Composite Objects . I want a rectangle with text field. So that the user could enter some information like name and location.
    I am working on map applet.
    How can I use the concept of composite object for the same?
    If there is any other way to do this please tell me.
    I am new to java programming.
    Thanks
    Message was edited by:
    rapid

  • Fill a rounded rectangle with a gradient paint with "new RoundRectangle2D"?

    Hello,
    at the moment I have to do a lot of Java2D to draw a customized GUI. Now it comes to a simple task, filling a rounded rectangle with a gradient paint. I have a solution for this - but I don't know if it is bad to do it this way:
    private void drawBackground( Component component, Graphics2D graphics2d ) {
         int w = component.getWidth() - 1;
         int h = component.getHeight() - 1;
         graphics2d.setPaint( gradientPaint );
         RoundRectangle2D backgroundShape =
              new RoundRectangle2D.Float( 0, 0, w, h, 10, 10 );
         graphics2d.fill( backgroundShape );
    }This is very easy and it works. The backdraw is, that on every call of "drawBackground", which is called on a repaint() method by Swing, a "new RoundRectangle2D.Float" will be created. I don't know how "expensive" it is to create a new RoundRectangle2D. On the other hand, I don't know how to fill a rounded rectangle with a gradient paint without a RoundRectangle2D.
    When I do it this way, I worry that at a later time, when I created a lot of custom components that all create shapes on a repaint, the GUI may become horrible slow or has a huge memory footprint.
    Well, I would like to hear some kind of "this is okay" (maybe because those Shape implementation are all not very memory consuming and the instanciation in Java is not very time consuming) by you Java2D experts :) Or, of course, how I could do it better.
    Thanks a lot for your help!

    patb1 wrote:
    on every call of "drawBackground", which is called on a repaint() method by Swing, a "new RoundRectangle2D.Float" will be created. I don't know how "expensive" it is to create a new RoundRectangle2D.
    When I do it this way, I worry that at a later time, when I created a lot of custom components that all create shapes on a repaint, the GUI may become horrible slow or has a huge memory footprint.You could do as many UI delegates in the Swing code do with Rectangles: maintain a RoundRectangle2D as a field and set its attributes when it is to be painted (setRoundRect(double x, double y, double w, double h, double arcw, double arch)).
    db

  • Draw rectangle at the Intensity graph (position where it is clicked )

    I am able to extract coordinates using mouse down and mouse up event structure but unable to draw the rectangle at the specified positions.I am getting coordinates at mouse down and mouse up event  in these bounds.I want to draw a rectangle at the position of coordinates but unable to do so.
    Solved!
    Go to Solution.
    Attachments:
    Draw Rect on Intensity Graph.vi ‏21 KB

    One more thing, since you're using the Draw Rectangle function you need to deal with the cases where the rectangle is not drawn from top left to bottom right. You have to make sure the minimum X value goes to the LEFT input and the minimum Y value goes to the TOP input of the rect terminal of the Draw Rectangle vi. Use the Max & Min function from the comparison palette for this.
    Ben64
    Attachments:
    Draw Rect on Intensity Graph3.vi ‏16 KB

  • Draw rectangle and apply fill color

    Hi
    anyone help me to draw rectangle outside artboard and apply fill color
    i want to draw 10 rectangle of same size and apply fill color using javascript
    Thak you
    appu

    Now that I am addressing the path items and text items of the group separately I am having some success. Now I am having difficulty getting the correct terms for assigning a Spot Color to the file. Here is a piece of the script.
    This works:
    tell application "Adobe Illustrator"
    set openDoc to document 1
    set ftClr1 to (first group item whose note is "Front3") of openDoc
    set ftClr1Paths to path items of ftClr1
    repeat with thisPath in ftClr1Paths
    set fill color of thisPath to {red:255}
    end repeat
    set textFrames to text frames of ftClr1
    repeat with thistext in textFrames
    set fill color of every line of thistext to {red:255}
    end repeat
    end tell
    Need help to set the fill color to a Spot Color that already exists in Swatches.
    Thanks
    Nick

  • How to Trim Rectangle with text to create reflection?

    Hello Everyone,
    I am realtively new to Illustrator and I am facing a problem that I am hoping some expert here can resolve. I have some text and I have converted it to outlines. Now I want to create shine on it. I want to fill a rectangle with white color and then clip it with text to give reflection effect but I can't figure out how to do it. I have selected my text and rectangle and tried all options in path finder tool but nothing seems to work. Please guide me how can this be done.
    Regards,
    Afraz Ali

    Afraz Ali,
    If you want to have the colour/colours/colour transition of the rectangle where the text is is nothing outside it, in other words colour the text with the colouring of the rectangle, you may:
    Use Live Type over the rectangle, select both, and Object>Clipping Mask>Make.
    With outlined type, you have to turn the lettershapes into a Compound Shape first.
    As you can see, it is simpler to just use Live Type, and it is editable.

  • What is the issue? When printing a 30x42 drawing PDF with 5 pages. The first drawing prints properly, but none of th eothers do. IF I print each separately, by selecting "current page" they print fine. Oh this is for Acrobat XI Standard.

    RE Acrobat XI Standard. When printing a 30x42 Drawing PDF with more than 1 page only the first page prints properly the rest are not the proper size or centered. Did I miss a setting? For now I can work around it by printing each page using the "Current Page" setting, but this delays me when there is more than 20 pages etc..

    RE Acrobat XI Standard. When printing a 30x42 Drawing PDF with more than 1 page only the first page prints properly the rest are not the proper size or centered. Did I miss a setting? For now I can work around it by printing each page using the "Current Page" setting, but this delays me when there is more than 20 pages etc..

Maybe you are looking for