Need to draw a line in a screen

I have created a custom screen in screen painter . I need to draw straight line in my screen between two blocks .
Is there any option for that in screen painter?
Thanks

hi Priya,
  Do as Rich as suggested i.e, use Text Field with underscores...
and by the way..
please close this thread
screen in display mode
by marking helpful answers incase if your problem is solved/ Question is answered

Similar Messages

  • I need to draw some line over my JFrame

    I draw them using the paint method. The lines are drawn but the JInternal Frame does not show all the other components, JTextFields, JLabels...
    Can please S.O help me?
    my code is:
    public void paint (Graphics2D g)
    g.setColor(Color.black);
    cambiaColor cc = new cambiaColor();
    Font fo;
    fo = new Font ("Arial Unicode MS",Font.BOLD,10);
    g.setFont(fo);
    java.awt.FontMetrics metric = g.getFontMetrics(g.getFont());
    g.drawRect(0,90,450,270);
    g.drawRect(0,100,450,60);
    int ini = Integer.parseInt(((Object[])((Object[])dec.getDatosControlador())[2])[0].toString())-1;
    int fin = Integer.parseInt(((Object[])((Object[])dec.getDatosControlador())[2])[1].toString());
    int rowIni = (int)(ini/8);
    int rowEnd = (int)(fin/8);
    int c=0;
    if ((ini != 0) && (fin !=32))
    for (int i=rowIni;i<=rowEnd;i++)
    if (i>rowIni)
    ini = (8*c);
    if ((i+1)*8>fin)
    g.drawRect((50*(ini%8))+20,(i*63)+95,((50*(fin%8))+20)-((50*(ini%8))+20),63);
    else
    g.drawRect((50*(ini%8))+20,(i*63)+95,425-((50*(ini%8))+20),63);
    c++;
    g.setColor(new Color(204,204,204));
    g.drawLine(10,10,15+metric.stringWidth("Detectores"),10);
    g.drawLine(10,90,15+metric.stringWidth("Grupos"),90);
    g.setColor(Color.black);
    g.drawString("Detectores",15,10);
    g.drawString("Grupos",15,90);
    }

    Take a look at the RootPane tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html
    Specifically at the GlassPane stuff.
    The GlassPaneDemo shown there includes some code where the paint method was modified. I think you can use something like that in your code too.

  • I am writing a program that needs to draw gradient lines according to the points that i touch on ipad. For this i am using "DrawLinearGradient" function. But the 2 colors that i am giving for drawing gradient is not dividing equally in the complete line.

    Can anyone please help about the parameters that need to be passed corectly.
    CGColorSpace colorSpace = CGColorSpace.CreateDeviceRGB();
    CGColor[] colors = {UIColor.Red.CGColor,UIColor.Green.CGColor};
    float[] locations = {0.0f,0.5f,0.5f,1.0f};
    CGGradient gradient = new CGGradient(colorSpace,colors,locations);
    ColorMessage.FontSize = width;
    context.SetLineWidth(width);
    context.SaveState();
    context.Clip();
    context.DrawLinearGradient(gradient,penVertices[0],penVertices[count-1],0);
    context.StrokePath();
    gradient.Dispose();
    colorSpace.Dispose();
    context.RestoreState();

    Wouldn't this be better posted in a developers forum? This forum is for Using an iPad, not writing programs for one.

  • Need to draw line after the 2nd line item(Smart Forms)

    Dear Friends,
    I need to draw horizontal line after the 2nd line item  and 3rd line item in smart forms.How can i achive this.
    Plz help.
    Edited by: farook shaik on May 19, 2009 8:19 AM

    This is what you need to do:
    1> In the tables->details section define two line types LT1 and LT2.
    2> Come back to tables section pressing the table painter button.
    3> Select a line type for which you want to have an underline(say LT2).
         a] If the anchor cursor does not come click the draw lines and columns button( the pencil icon nutton)
         b] select the line type ( it will become black after selection. Press and hold down ctrl to select
             multiple cells.
         c] after selection click the lower 'frame button' ( which is right at the top of box and shading).
    4> Now goto data section where you have given your internal table name and work area.
         a] in the sort criteria put your field POSNR and check the Event on Sort end chk box.
         b] you will see an extra node under the main area of the table.
         c] Create a table line with the line type LT2 in the node.
         d]Also in the Main area add another table line with LT1 as the line type.
    5> If POSNR remains unchnged LT1 will be triggered.
    6> if Posnr changes then LT2 will be triggered with the underline.
    This will suffice your requirement.

  • VA02: protect a line in condition screen depending on a type condition

    Hi all,
    I need to protect a line in condition screen depending on a type condition
    using the transaction VA02.
    Does anybody know the user-exit to do this ?
    I thank you in advance.
    Best Regards.
    Paolo

    Hi,
    I believe you cannot do it on condition basis...unless if you want to modify standard sap code.
    In the condition type config V/06..In the "changes which can be made" section there is an input for manual entries...there you can give D to not allow to change the condition ...
    Thanks
    Naren

  • Drawing dotted lines

    Hey
    I've already figured out how to draw dotted lines so that's not the questions
    the thing is I only need to draw some lines as dotted, some as dashed and all others just normal..
    I figured I could make radiobox to select which line.. then I save that to an array of some sort and then in the paintComponent thing I should make an if to check for array value and change the stoke according to that
    so far I've just made my lines dotted like this
    http://www.jguru.com/faq/view.jsp?EID=114099
    but now everything is dotted.. even the borders around my buttons..
    ni my applet I have some buttons which are connected with a line.. I want that line dotted or dashed when the users wants it to.. and only then otherwise just normal lines
    I couldn't find anything about that on the google =(

    done!
    now I want to be able to use diffrent line style combinations but it doesn't work
    currently it only uses the linestyle that you selected for the first line and then uses that for every line after that too
    this is my code
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              Graphics2D g2d = (Graphics2D)g;
              g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              g2d.setColor(lijnKleur);
              for (int i = 0; i < Main.XList.size(); i++) {
                   int j = (i - 1);
                   int k = (i + 1);
                   int aantal = 0;
                   if ((k % 2 == 0) && (i != 0)) {
                        if (Main.lijnstyleList.get(aantal) == 1){
                             g2d.setStroke(normaal);
                        else if (Main.lijnstyleList.get(aantal) == 2){
                             g2d.setStroke(gestippeld);
                        else if (Main.lijnstyleList.get(aantal) == 3){
                             g2d.setStroke(gestreept);
                        else{
                             g2d.setStroke(normaal);
                        int tmpX_oud = Main.XList.get(j) + (Main.breedte / 2);
                        int tmpY_oud = Main.YList.get(j) + (Main.hoogte / 2);
                        int tmpX = Main.XList.get(i) + (Main.breedte / 2);
                        int tmpY = Main.YList.get(i) + (Main.hoogte / 2);
                        aantal++;
                        if (tmpY_oud > tmpY){
                             tmpY = tmpY + (Main.hoogte / 2);
                             int half = tmpY + (Main.spacing / 2);
                             if ((tmpY_oud != tmpY) && (tmpX_oud != tmpX)) {
                                  g2d.drawLine(tmpX_oud, tmpY_oud, tmpX_oud, half);
                                  g2d.drawLine(tmpX_oud, half, tmpX, half);
                                  g2d.drawLine(tmpX, half, tmpX, tmpY);
                             else{
                                  g2d.drawLine(tmpX_oud, tmpY_oud, tmpX, tmpY);
                             g2d.drawLine(tmpX, tmpY, tmpX - 5, tmpY + 8);
                             g2d.drawLine(tmpX, tmpY, tmpX + 5, tmpY + 8);
                        else if (tmpY_oud < tmpY){
                             tmpY = tmpY - (Main.hoogte / 2);
                             int half = tmpY - (Main.spacing / 2);
                             if ((tmpY_oud != tmpY) && (tmpX_oud != tmpX)) {
                                  g2d.drawLine(tmpX_oud, tmpY_oud, tmpX_oud, half);
                                  g2d.drawLine(tmpX_oud, half, tmpX, half);
                                  g2d.drawLine(tmpX, half, tmpX, tmpY);     
                             else{
                                  g2d.drawLine(tmpX_oud, tmpY_oud, tmpX, tmpY);
                             g2d.drawLine(tmpX, tmpY, tmpX - 5, tmpY - 8);
                             g2d.drawLine(tmpX, tmpY, tmpX + 5, tmpY - 8);
                        else {
                             if (tmpX_oud > tmpX){
                                  tmpX = tmpX + (Main.breedte / 2);
                                  g2d.drawLine(tmpX_oud, tmpY_oud, tmpX, tmpY);
                                  g2d.drawLine(tmpX, tmpY, tmpX + 8, tmpY - 5);
                                  g2d.drawLine(tmpX, tmpY, tmpX + 8, tmpY + 5);
                             else{
                                  tmpX = tmpX - (Main.breedte / 2);
                                  g2d.drawLine(tmpX_oud, tmpY_oud, tmpX, tmpY);
                                  g2d.drawLine(tmpX, tmpY, tmpX - 8, tmpY - 5);
                                  g2d.drawLine(tmpX, tmpY, tmpX - 8, tmpY + 5);
              g2d.setStroke(normaal);
         }**EDIT**
    according to this it can be done..
    http://java.sun.com/developer/JDCTechTips/2003/tt0520.htm
    no clue why mine doesn't work then
    Edited by: Nizzle on Sep 13, 2007 10:15 AM

  • How to draw vertical lines that are visible in preview mode?

    Hi all,
    I need to draw vertical lines on a document. The lines must be same as we draw using line tool.
    I could draw the line using CreateLineSpline() method of IPathUtils.
    The problem is that these lines are not visible in preview mode. Please tell how can we make lines that are visible in preview mode.
    Please help, I'm running out of time.

    CodeSnippetRunner has the answer:
    Utils<IPathUtils>()->CreateLineSpline

  • Drawing straight lines

    Hi,
    in my programm I need to draw straight lines(I hope this is the correct translation for an infinit line). Is there a way of doing this?

    I just answered my own question.
    I checked Illustrator Preferences and under GENERAL: CONSTRAIN ANGLE, mine was set to 0.19 degrees (for reasons unknown).
    I changed it to zero and Voila! Who'd have thought this would alter the whole drawing surface?
    All I had to do was ask others in order to figure it out myself! Hope this helps anybody else having this bizarre problem.
    Vic.

  • How to draw centre line with white background?

    Hi,
    I need to draw a centre line with white background on it. Now i'm doing it by pasting the main line in the background and giving it white so that it shows a white backgound. Is there a way to do just by drawing like normal lines. If we can, is it possible to control the white backgound only to show less than the original line in both ends. This is for illustrations i do for exploding views and i need to draw this line to show it as assembly drawing.
    Thanks
    Manoj

    1. Draw a white line segment of desired width (stroke weight) with round cap (Stroke panel) for the background line.
    2. Copy, Paste in Front
    3. Change to desired foreground color, butt cap, reduce stroke weight.
    4. Opt/Alt–drag foreground segment to overhang background segment by desired amount on both ends.
    5. Select both segments and drag to Brushes panel, choose Art Brush.
    6. In Art Brush Options choose Stretch Between Guides, drag guides somewhere to the inside of curve of round caps. (If in step 3 you chose black, set Colorization Method to Tints. Then you can select any color for the foreground segment by setting the stroke color.) Name the brush as you choose. Click OK.
    7. Draw any path and apply the brush.

  • All I have on my I pod touch is a white screen with multicolored lines going across screen.  What do I need to do.  I can't use I tunes because it says I have to have passcode and can't get screen to come up.  I have already tried holding both keys down.

    All I have on my I pod touch is a white screen with multicolored lines going across screen.  What do I need to do.  I can't use I tunes because it says I have to have passcode and can't get screen to come up.  I have already tried holding both keys down.

    - See if placing the iPod in Recovery mode will allow a restore.. It bypasses the passcode (and erases the iPod)
    - Next try DFU mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • How do I get the screen to refresh when drawing a line larger than the art board

    How do I get the screen to refresh properly when drawing a line larger than the art board when the screen scrolls? Everything turns white in CS6, CS5 and CS4.

    Existing art - not the new art.  The new art just gets a proxy shape - seen in my example as the blue rectangle.  The existing art is what gets smeared as you drag past the edge of the screen.  If it's anything other than an Ilustrator thing, it's a Mac thing. I've never known it to be any other way other than maybe in the past showing blank white instead of stuttered art on probably 10 different macs over the years.
    Take any art that you've ever created.  Zoom in so that your art is bigger than your screen (so that there's somewhere to scroll).  Rectangle tool (or move, scale, rotate(?) something, or draw a line) Start your rectangle anywhere, drag so that you are at the edge of the screen, causing it to scroll.  The existing art will get all effed up.  The rectangle you're drawing will draw as you expect it to - that's not the issue.
    How does Wade take his videos?

  • Simple question - need to create a line that moves across the screen

    Hello All;
    Simple problem - I need to animate a line of a solid color that starts on the right and moves across the screen to the left. I know I can create a layer of a solid color and then animate the scale to sort of make it work but that changes both sides of the line and I need to only change the position of one side.
    I know there are probably numerous ways of doing this - what is the easiest and most straightforward. Thanks.
    Tim

    [email protected] wrote:
    > Hello All;
    > Simple problem - I need to animate a line of a solid color that starts on the right and moves across the screen to the left. I know I can create a layer of a solid color and then animate the scale to sort of make it work but that changes both sides of the line and I need to only change the position of one side.
    >
    > I know there are probably numerous ways of doing this - what is the easiest and most straightforward. Thanks.
    >
    > Tim
    rectangular mask that covers line, animate it off screen and it will
    reveal the line as it moves off.

  • Need help on drawing multiple squares on the screen

    I am working on a project for aircraft seating and what i have to do is create square on the screen as seat. I got to draw 180 squares on the screen and it sounds easy but i have been stuck at it for about 10 days now my superviser doesn't know java so he can't help me on what i should do next and java superviser's told me they have no time to see me so if anyone here can help to guide me where i am goin wrong or how i should do it would be very helpful. Here is the code i have so far i think i am maybe close to gettin it working but then again i could be far off.
    import java.awt.BorderLayout;
    import java.awt.Graphics;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class Seating extends JFrame {
        private JPanel boardPanel;
        private JPanel panel2;
        private Square board[][];
        public Seating() {
            boardPanel = new JPanel();
            boardPanel.setLayout(new GridLayout(6,30,0,0));
            //create board
            board = new Square[6][30];
            //rows in the board
           for(int row = 0; row < board.length; row++)
               //column on the board
                for(int column = 0; column < board[row].length; column++)
                    //create square
                    board[row][column] = new Square(' ', 3 * row + column);
                    //add square
                    boardPanel.add(board[row][column]);
                panel2 = new JPanel();
                panel2.add(boardPanel, BorderLayout.CENTER);
                add(panel2, BorderLayout.CENTER);
                setSize(2000,1500);
                setVisible(true);
                 private class Square extends JPanel
                    public Dimension getPreferedSize()
                      return new Dimension(20,20);
                    public Dimension getMinimumSize()
                        return getPreferedSize();
                    public void paintComponent(Graphics g)
                        super.paintComponents(g);
                        g.drawRect(0, 0, 19, 19);
    }

    Yeah I'd make a Seat class, subclassing JLabel, and then add some business logic to them to reflect that. For example, if they're already booked, given them a different color and disable clicks on them. If they're bookable, add a mouse click listener. Maybe I'd make different subclasses of Seat for those different roles. I'd add them all to the grid, but also add them to a Map indexed by seat name or something so I could find them and update them as needed.

  • It apper some longitudinal lines on my screen. Can I fix it or I need a professional service?

    It appear some longitudinal lines on my screen
    Can I fix it or the touch is broken?

    Restore iPhone with iTunes on your computer. See if better. If still problem your iPhone has full Apple Warranty.

  • Here are my last 3 duke dollars.  Can someone please help me draw a line?

    I have been BEATING my head on this for well over a week now. I'm new to Java2D and I cannot find even one example of this simple little thing that I am trying to do. Not one.
    All I want to do is draw an image, zoom that image, then draw some lines on that image, and then zoom it and have those lines show up where they should.
    For example, we have an image which has been zoomed. No lines are yet drawn on it.
    A line is added.
    The image is then zoomed in or out one more time.
    How do we get the line to remap to the newly zoomed image?
    What I am doing is:
    0) Load up an image from a file.
    1) Create a zoomed image by using the Image.getScaledInstance() method.
    2) Create a BufferedImage with the width and height of the image AFTER the zoom has taken place.
    3) Create a Graphics2D object by the createGraphics from this BufferedImage.
    4) Place the image into the BufferedImage by doing a BufferedImage.drawImage
    5) Select two points to be the start and end of the line.
    6) Draw the line using Graphics2D.drawLine(start.x, start.y, end.x, end.y).
    7) Zoom the image again (using the Image.getScaledInstance() method.
    8) Create a new ImageIcon using the image from above and override its paintIcon method like this:
    ImageIcon newIcon = new ImageIcon(newImage) {                       
    public void paintIcon(Component c, Graphics g, int x, int y)
    super.paintIcon(c, g, x, y);
    zoom(); //<---- ZOOM call
    Now in the zoom routine, what do I need to do to get the lines to draw at the proper location and size?
    Remember, the points of the lines (stored in a list as home grown line objects) are in screen coordinates, not image coordinates since they are just click points
    Note that when I use these points to draw a line, all is well (the line gets drawn where it should), but I have problems when I zoom the image.
    Thanks!

    Below is the documentation and method signature of
    Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer);The important thing to note is that it does scaling on the fly if the size dictated by the source co-ordinates is defferent than the size dictated by the destination co-ordinates. The source image is always left un-touched.
    So basically your visual data is located in an offscreen image. You can draw a line on that. Then create a new image, get it's graphics and call drawImage(original_image, co-ordinates that cause it to scale how you like).
    Then you can draw lines on the 2nd image, create a 3rd, ...etc
         * Draws as much of the specified area of the specified image as is
         * currently available, scaling it on the fly to fit inside the
         * specified area of the destination drawable surface. Transparent pixels
         * do not affect whatever pixels are already there.
         * <p>
         * This method returns immediately in all cases, even if the
         * image area to be drawn has not yet been scaled, dithered, and converted
         * for the current output device.
         * If the current output representation is not yet complete then
         * <code>drawImage</code> returns <code>false</code>. As more of
         * the image becomes available, the process that draws the image notifies
         * the specified image observer.
         * <p>
         * This method always uses the unscaled version of the image
         * to render the scaled rectangle and performs the required
         * scaling on the fly. It does not use a cached, scaled version
         * of the image for this operation. Scaling of the image from source
         * to destination is performed such that the first coordinate
         * of the source rectangle is mapped to the first coordinate of
         * the destination rectangle, and the second source coordinate is
         * mapped to the second destination coordinate. The subimage is
         * scaled and flipped as needed to preserve those mappings.
         * @param       img the specified image to be drawn
         * @param       dx1 the <i>x</i> coordinate of the first corner of the
         *                    destination rectangle.
         * @param       dy1 the <i>y</i> coordinate of the first corner of the
         *                    destination rectangle.
         * @param       dx2 the <i>x</i> coordinate of the second corner of the
         *                    destination rectangle.
         * @param       dy2 the <i>y</i> coordinate of the second corner of the
         *                    destination rectangle.
         * @param       sx1 the <i>x</i> coordinate of the first corner of the
         *                    source rectangle.
         * @param       sy1 the <i>y</i> coordinate of the first corner of the
         *                    source rectangle.
         * @param       sx2 the <i>x</i> coordinate of the second corner of the
         *                    source rectangle.
         * @param       sy2 the <i>y</i> coordinate of the second corner of the
         *                    source rectangle.
         * @param       observer object to be notified as more of the image is
         *                    scaled and converted.
         * @return   <code>true</code> if the current output representation
         *           is complete; <code>false</code> otherwise.
         * @see         java.awt.Image
         * @see         java.awt.image.ImageObserver
         * @see         java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
         * @since       JDK1.1
        public abstract boolean drawImage(Image img,
                              int dx1, int dy1, int dx2, int dy2,
                              int sx1, int sy1, int sx2, int sy2,
                              ImageObserver observer);

Maybe you are looking for

  • Which is better: WRT150 or WRT300N ?

    Does anyone the differences between these two modems and which one is "Better"  ?

  • [SOLVED] Cannot mount usb (as normal user)

    Hello I'm facing this problem for the first time, but can't tell if it came after an update or an unexpected reboot (light went out). I'm using latest kde (4.9.2?), and the latest kernel, Linux gantz 3.6.6-1-ARCH #1 SMP PREEMPT Mon Nov 5 11:57:22 CET

  • Locking items

    Hi, I'm adding pages to a document but I want to keep some items on de master page (I don't want them to be put on the real pages). The "V-lijn" is a vertical line and the footer is a group of objects that form a footer on each page. Sometime I need

  • FN + F8 not working on Satellite P750

    we have had no trouble using the wireless connection on our Satellite P750 notebook but this morning my husband did the FN+F8 button, the light went out, came back on almost immediately and we lost wireless connection. When we push FN +F8 again its s

  • Keep-Alive Portlet

    Does anyone know of a keep-alive portlet that will keep the users session alive while they are on a specific page? My problem is that the users are getting logged off of the portal after 20 minutes of inactivity, so what I'd like to do is have a port