How to draw line on SAP form

Hi everyone,
Who have a good way to draw lines on SAP form?
I created a Wizard form, and use Rectangle (Height=0) as the two lines between title and bottom button, but I met a problem, when show another form which cover the line, after close this form, some part of lines disappear, I have tried using SAP form refresh, it still can not restore showing line completely, who have good way to workaround the problem or give me another way to draw line.
Thanks in advance!
Kathy

The only way I found to get a form looking really close to a standard B1 Wizard form is to use bitmaps.  I use 3 - one each for the top, bottom and left hand side.  The bitmaps include the line drawing and appropriate pictures/background colours.  I normally define these in the XML used to create the form as in the following example:-
<item uid="PTOP" type="117" left="0" width="566" top="0" height="80" visible="1" enabled="1" from_pane="0" to_pane="0">
        <AutoManagedAttribute/>
        <specific picture="AZU_SPC_WIZ_TOP2.bmp">
                <databind databound="0" table="" alias=""/>
        </specific>
</item>
<item uid="PBOT" type="117" left="0" width="566" top="336" height="40" visible="1" enabled="1" from_pane="0" to_pane="0">
        <AutoManagedAttribute/>
        <specific picture="AZU_SPC_WIZ_BOT.bmp">
                <databind databound="0" table="" alias=""/>
        </specific>
</item>
<item uid="PLEFT" type="117" left="0" width="100" top="0" height="336" visible="1" enabled="1" from_pane="1" to_pane="1">
        <AutoManagedAttribute/>
        <specific picture="AZU_SPC_WIZ9.bmp">
                <databind databound="0" table="" alias=""/>
        </specific>
</item>
John.

Similar Messages

  • How to draw lines in FCPX ?

    Hi there,
    I would like to have a simple Effects that will draw lines in various shape such as circle, ellipse or rectangle. How do I do it ?
    I need it because I want to have an effect that is drawing an ellipse over the text.
    Any ideas ?
    Thanks

    ok... hmmm...
    You can create control points for a line but you cannot animate the control points in FCPX. If you're okay with that, then here are the basics:
    Create a new top level group. Name it OSCs.
    In the Inspector, select the group and in the Group tab of the inspector, select Fixed Resolution. (It should already be set to 2D - if not - set 2D)
    In the Properties > Timing pane, set the length (Duration) of the group to at least as long as your project. (this step is not important in Motion but absolutely necessary for FCPX!)
    With the new group selected, add the filters you will use as control points. In general, every starts with Filters > Distortion > Poke. You will need two of them. For each Poke filter, select Publish OSC in the inspector. (I recommend renaming each filter - startOSC, endOSC for example.)
    Create another new group.
    Go into the Library > Content and search for Crosshair -- there's three of them, use Crosshair-Minute (they're the smallest ones.) Add two of them. (It's not necessary that they're in their own group -- just more convenient.) Rename the crosshairs: keeping with the OSCs, I recommend start and end, for example.
    Draw a Line.
    To the shape (line), add two Behaviors > Shape > Track Points.
    Rename the Track Points: Start and End.
    In the Behaviors inspector for the Track Points, drag the start Crosshair image into the Source well of the Start track points and the end Crosshair image into the End Track Points. The behavior parameters will change and you'll see a bunch of new stuff. Down at the bottom, you'll see Track 1 and Track 2 — leave one checked for one of the behaviors and the other one checked for the second behavior (that's 1 track 1 and 1 track 2.) You'll also see that the Transform is set to Mimic Source.  What you need to do is click the reset button on the Checked Track of each behavior and THEN change the Transform to Attach to Source. Once you do that, the line ends will snap to crosshair images (use Properties Transform X to move the crosshairs apart temporarily.)
    Next step:
    Select the start crosshair and in the Inspector > Properties, dial down the Position to reveal the XYZ parameters. Right click on the X and select Add Parameter Behavior > Link.  Repeat this step for the Y parameter (you cannot link Position.All for this step.)
    In the Behaviors inspector, for the start crosshair:
          For the Source Object, drag the OSCs group into the well.
    for the X parameter
          For the Source Parameter, set Filters.startOSC.Center.X for the Position.X
                                                 and set Filters.startOSC.Center.Y for the Position.Y
    You will notice the line end disappear off the screen. This is normal. To correct this, at the bottom of each behavior, set the X (or Y) offset to -0.5.
    Repeat for the end crosshair.
    You can turn off the crosshairs (uncheck the layers.)
    To test your OSCs, select *both* startOSC and endOSC (command select each layer) -- both Poke OSCs will appear and you can drag them around the canvas. The line should follow as you would expect if you've set everything up correctly.
    Publish the template.
    A couple of explanations:
    2D fixed resolution for the OSC group:  Groups in Motion that are not fixed resolution can dynamically change their boundaries. There are no fixed points of reference for Motion to calulate. If you forget to set Fixed Resolution, you can repair the condition by setting the Fixed Resolution option and then go into the Filters pane and reset the Center parameters for each Poke OSC.
    Offsets of -0.5:  All resolutions in the Canvas are calculated by the resolution of the X and Y dimensions of the project times the fractional position of objects (from 0.0 on the left side for X and on the bottom for Y — to 1.0 on the right side for X and on the top for Y.) The center of the canvas is 0, 0 in pixels of whatever the resolution is.  To adjust the fractional position used by the OSCs (and others) to the center pixel, the value needs to be moved by 1/2 of that distance.
    Clear as mud?  Once you've done it a few times, it will all become second nature.
    One more thing: you can publish curves... complex ones. But they have to be B-spline (you track all the points in a similar manner outlined above) and not Bezier. There's no way to control the handles for bezier curves.

  • How to draw line with width at my will

    Dear frineds:
    I have following code to draw lines, but I was required:
    [1]. draw this line with some required width such as 0.2 or 0.9 or any width at my will
    [2]. each line after I draw, when I use mouse to click on it, it will be selected and then I can delete it,
    Please advice how to do it or any good example??
    Thanks
    sunny
    package com.draw;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              g.setFont(getFont());
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 2;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[1] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[1] = endPoint.y;
                   /*if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }Message was edited by:
    sunnymanman

    sonudevgan wrote:
    dear piz tell me how i can read integer from user my email id is [email protected]
    foolish, foolish question

  • How Can I create a SAP form that contains activeX report viewer?

    I'm trying to create a SAP form that contains a ActiveX control to view a Crystal Report. Can anyone Help?
    Thanks,
    Ezequiel.

    Thanks Ludek, I use this a sub to create a report document and report viewer in sap bussines one form.
    Running this code shows the sap business one form with the report viewer but then closes SAP Business One Application.
    which may be the problem?.
    Private Sub CreateFormWithActiveX()
        Dim CP As SAPbouiCOM.FormCreationParams
        Dim fTree As SAPbouiCOM.Form
        Dim AcXTree As SAPbouiCOM.ActiveX
        Dim oItem As SAPbouiCOM.Item
        Dim CRapp As CRAXDDRT.Application
        Dim CRRep As CRAXDDRT.Report
        'Dim CRepDoc as
        ' Set the form creation parameters
        CP = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
        CP.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
        CP.FormType = "ACXTree"
        CP.UniqueID = "ACTree1"
        fTree = SBO_Application.Forms.AddEx(CP)
        fTree.Left = 10
        fTree.Top = 10
        fTree.Width = 800
        fTree.Height = 600
        fTree.Title = "Crystal Report Viewer - Argentis"
        fTree.AutoManaged = True
        ' Add the TreeView Control to the form
        oItem = fTree.Items.Add("Tree", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
        oItem.Left = 1
        oItem.Top = 1
        oItem.Width = 800
        oItem.Height = 600
        ' Create the new activeX control
        AcXTree = oItem.Specific
        CRapp = New CRAXDDRT.Application
        CRRep = CRapp.OpenReport("C:\Projects\Crystal Report ActiveX Viewer\Crystal\Indumetaria\Reportes\ARInvoiceMatrix_portrait.rpt", 1)
        'CRRep.RecordSelectionFormula = "{OINV.DocEntry} = {?doc_num}"
        For i As Integer = 1 To CRRep.Database.Tables.Count
          Dim ConnectionInfo As CRAXDDRT.ConnectionProperties
          ConnectionInfo = CRRep.Database.Tables(i).ConnectionProperties
          ConnectionInfo.Delete("Integrated Security")
          ConnectionInfo.Delete("Provider")
          ConnectionInfo.Delete("Data Source")
          ConnectionInfo.Delete("Initial Catalog")
          ConnectionInfo.Delete("User ID")
          ConnectionInfo.Delete("Password")
          ConnectionInfo.Add("Provider", "SQLOLEDB")
          ConnectionInfo.Add("Data Source", "Ezequiel")
          ConnectionInfo.Add("Initial Catalog", "SITKA")
          ConnectionInfo.Add("Integrated Security", 0)
          ConnectionInfo.Add("User ID", "sa")
          ConnectionInfo.Add("Password", "sa2005")
        Next
        AcXTree.ClassID = "CrystalReports102.ActiveXReportViewer.1"
        'oTreeView = AcXTree.Object
        oViewer = AcXTree.Object
        oViewer.EnableToolbar = True
        oViewer.EnableStopButton = True
        oViewer.EnableSelectExpertButton = True
        oViewer.EnableSearchControl = True
        oViewer.EnableRefreshButton = True
        oViewer.EnableProgressControl = True
        oViewer.EnablePrintButton = True
        oViewer.EnablePopupMenu = True
        oViewer.EnableGroupTree = False
        oViewer.DisplayGroupTree = True
        oViewer.ReportSource = CRRep
        oViewer.ViewReport()
        fTree.Freeze(True)
        ' Make the form visible
        fTree.Visible = True
      End Sub
    Regards.

  • How to draw Line Chart in SAP?

    There is a request that the customer want to see Line Chart in the report.
    Is it possible to do it using abap?
    Thank you very much.

    Hi,
    Yes it is possible.
    GOto Tcode SE83>Expand graphics node>double click on that
    you will get all graphic programs.

  • How to draw line to connect components dynamically??

    Dear Friends:
    I have following code is for drag/drop label, I hope to draw straight line to connect any TWO or more labels within this panel,
    [1]. keep all connected line
    [2]. can draw dynamically,
    I search quite a while with google, still very confused,
    Can any guru throw aome light how to do
    [1]. code 1:
    package swing.dnd;
    import java.awt.*;
    import javax.swing.*;
    public class TestDragComponent extends JFrame {
         public TestDragComponent() {
              super("Test");
              Container c = getContentPane();
              c.setLayout(new GridLayout(1,2));
              c.add(new MoveableComponentsContainer());
              c.add(new MoveableComponentsContainer());
              pack();
              setVisible(true);
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception ex) {
                   System.out.println(ex);
              new TestDragComponent();
    [2]. Code 2:
    package swing.dnd;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.awt.dnd.*;
    import java.awt.datatransfer.*;
    import java.awt.image.*;
    import java.awt.dnd.DragSource;
    import java.awt.dnd.DropTarget;
    public class MoveableComponentsContainer extends JPanel {     
         public DragSource dragSource;
         public DropTarget dropTarget;
         private static BufferedImage buffImage = null; //buff image
         private static Point cursorPoint = new Point();
         public MoveableComponentsContainer() {
              setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.white, Color.gray));
              setLayout(null);
              dragSource = new DragSource();
              ComponentDragSourceListener tdsl = new ComponentDragSourceListener();
              dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, new ComponentDragGestureListener(tdsl));
              ComponentDropTargetListener tdtl = new ComponentDropTargetListener();
              dropTarget = new DropTarget(this, DnDConstants.ACTION_MOVE, tdtl);
              setPreferredSize(new Dimension(400,400));
              addMoveableComponents();
         private void addMoveableComponents() {
              MoveableLabel lab = new MoveableLabel("label 1");
              add(lab);
              lab.setLocation(10,10);
              lab = new MoveableLabel("label 2");
              add(lab);
              lab.setLocation(40,40);
              lab = new MoveableLabel("label 3");
              add(lab);
              lab.setLocation(70,70);
              lab = new MoveableLabel("label 4");
              add(lab);
              lab.setLocation(100,100);
         final class ComponentDragSourceListener implements DragSourceListener {
              public void dragDropEnd(DragSourceDropEvent dsde) {
              public void dragEnter(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragOver(DragSourceDragEvent dsde) {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dropActionChanged(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragExit(DragSourceEvent dse) {
                 dse.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
         final class ComponentDragGestureListener implements DragGestureListener {
              ComponentDragSourceListener tdsl;
              public ComponentDragGestureListener(ComponentDragSourceListener tdsl) {
                   this.tdsl = tdsl;
              public void dragGestureRecognized(DragGestureEvent dge) {
                   Component comp = getComponentAt(dge.getDragOrigin());
                   if (comp != null && comp != MoveableComponentsContainer.this) {
                        cursorPoint.setLocation(SwingUtilities.convertPoint(MoveableComponentsContainer.this, dge.getDragOrigin(), comp));
                        buffImage = new BufferedImage(comp.getWidth(), comp.getHeight(), java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE);//buffered image reference passing the label's ht and width
                        Graphics2D graphics = buffImage.createGraphics();//creating the graphics for buffered image
                        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));     //Sets the Composite for the Graphics2D context
                        boolean opacity = ((JComponent)comp).isOpaque();
                        if (opacity) {
                             ((JComponent)comp).setOpaque(false);                         
                        comp.paint(graphics); //painting the graphics to label
                        if (opacity) {
                             ((JComponent)comp).setOpaque(true);                         
                        graphics.dispose();
                        remove(comp);
                        dragSource.startDrag(dge, DragSource.DefaultMoveDrop , buffImage, cursorPoint, new TransferableComponent(comp), tdsl);     
                        revalidate();
                        repaint();
         final class ComponentDropTargetListener implements DropTargetListener {
              private Rectangle rect2D = new Rectangle();
              Insets insets;
              public void dragEnter(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dragExit(DropTargetEvent dte) {
                   paintImmediately(rect2D.getBounds());
              public void dragOver(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dropActionChanged(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void drop(DropTargetDropEvent dtde) {
                   try {
                        paintImmediately(rect2D.getBounds());
                        int action = dtde.getDropAction();
                        Transferable transferable = dtde.getTransferable();
                        if (transferable.isDataFlavorSupported(TransferableComponent.COMPONENT_FLAVOR)) {
                             Component comp = (Component) transferable.getTransferData(TransferableComponent.COMPONENT_FLAVOR);
                             Point location = dtde.getLocation();
                             if (comp == null) {
                                  dtde.rejectDrop();
                                  dtde.dropComplete(false);
                                  revalidate();
                                  repaint();
                                  return;                              
                             else {                         
                                  add(comp, 0);
                                  comp.setLocation((int)(location.getX()-cursorPoint.getX()),(int)(location.getY()-cursorPoint.getY()));
                                  dtde.dropComplete(true);
                                  revalidate();
                                  repaint();
                                  return;
                        else {
                             dtde.rejectDrop();
                             dtde.dropComplete(false);
                             return;               
                   catch (Exception e) {     
                        System.out.println(e);
                        dtde.rejectDrop();
                        dtde.dropComplete(false);
    Thanks so much for any help.
    Reagrds
    sunny

    Craig Wood's code here might do what you want
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=2&t=015259

  • How to draw line of best fit?

    Hey all,
    I am trying to draw a line of best fit with the scattered points being displayed as well. I have attached my VI below and tried all sorts of methods,
    but to no avail. I am aware that there is a 'liner fit.vi' which I tried, but it did not give me what I wanted. In fact the line wasn't best fit at all.
    I hope someone could help me as I'm new to LabVIEW.
    Thanks in advance!
    Cheers,
    Ruben 
    Attachments:
    Weibull LabVIEW Plot_Valve Spring.vi ‏15 KB

    Hi Ruben
    The Linear Fit.vi should provide the results you require.  Check the attachment for an edited version of your code.  Does this solve your problem?  You can check the help file for advice on using different fitting techniques, setting tolerances and weightings.
    Regards,
    Peter D
    Attachments:
    EDIT_Weibull LabVIEW Plot_Valve Spring.vi ‏23 KB

  • How to draw line art on a panel?

    I've spent a bit of time trying to figure out where to start, and come up with nothing, so.....
    ..... In CS6 I'm looking to put the equivalent of a C# picturebox onto a plugin panel to act as a thumbnail of sorts.  Within the picturebox the plugin would draw some lineart that would represent some properties of the original artwork that are of interest to the user.
    Is there a specific SDK suite that comes anywhere close to giving me some of that functionality?

    http://www.java2s.com/ExampleCode/2D-Graphics/Line.htm

  • HELP!!! Begginer working with a Swing Applet. DON'T KNOW HOW TO DRAW LINE

    Hi! I've been trying to draw a line in an applet and I can't. The thing is I'm using the tutorial to create the applet, so it comes with the standart methos and the standalone. I'm not sure if the problem is becausse I need to include in it a paint method or something.
    What I'm trying to do is to connect the to blocks (they really are jButtons), with an arrow. Thanks!!!!!!!!!
    Here's my code so far...// Copyright (c) 2000
    package package14;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import oracle.jdeveloper.layout.*;
    * Applet
    * <P>
    * @author Ana M Yanes Benatuil
    public class Appletboxes extends JApplet {
    boolean isStandalone = false;
    XYLayout xYLayout1 = new XYLayout();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    * Constructs a new instance.
    * getParameter
    * @param key
    * @param def
    * @return java.lang.String
    public String getParameter(String key, String def) {
    if (isStandalone) {
    return System.getProperty(key, def);
    if (getParameter(key) != null) {
    return getParameter(key);
    return def;
    public Appletboxes() {
    * Initializes the state of this instance.
    * init
    public void init() {
    try {
    jbInit();
    catch (Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    this.getContentPane().setLayout(xYLayout1);
    this.setSize(new Dimension(836, 545));
    jButton1.setText("jButton1");
    jButton2.setText("jButton2");
    jButton2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
    public void mouseDragged(MouseEvent e) {
    jButton2_mouseDragged(e);
    jButton1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
    public void mouseDragged(MouseEvent e) {
    jButton1_mouseDragged(e);
    this.getContentPane().add(jButton1, new XYConstraints(137, 120, 96, 45));
    this.getContentPane().add(jButton2, new XYConstraints(452, 118, 96, 49));
    * start
    public void start() {
    * stop
    public void stop() {
    * destroy
    public void destroy() {
    * getAppletInfo
    * @return java.lang.String
    public String getAppletInfo() {
    return "Applet Information";
    * getParameterInfo
    * @return java.lang.String[][]
    public String[][] getParameterInfo() {
    return null;
    * main
    * @param args
    public static void main(String[] args) {
    Appletboxes applet = new Appletboxes();
    applet.isStandalone = true;
    JFrame frame = new JFrame();
    frame.setTitle("Applet Frame");
    frame.getContentPane().add(applet, BorderLayout.CENTER);
    applet.init();
    applet.start();
    frame.setSize(400, 420);
    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
    frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2);
    frame.setVisible(true);
    frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } });
    static {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception e) {
    e.printStackTrace();
    void jButton1_mouseDragged(MouseEvent e) {
    jButton1.setLocation(e.getX() + jButton1.getX() , e.getY() + jButton1.getY());
    void jButton2_mouseDragged(MouseEvent e) {
    jButton2.setLocation(e.getX() + jButton2.getX() , e.getY() + jButton2.getY());

    The other thing is that the boxes can be dragged and dropped, so the lines would have to be moved too (if they're related to the moved blocks)

  • How to create line in smart form

    dear all,
            i hv to create lines in smartform.
    BOX XPOS '0' MM YPOS '6' MM HEIGHT '0' MM WIDTH '190' MM FRAME 1 PT
    by using above statement i can create line in SAPSCRIPT.
    is there any similar statement in smartform to create lines
    if So plz send me a code.
    regards
    Vinod.

    create window and provide these parameters  in the output options to get the line. and  in  line  select check box line with                                                                               
    Left margin          0.00      CH    Width           80.00       CH   
      Upper margin     12.50      LN    Height             0.05       LN                                                                               
    line
       check the box  line with                                                                               
    Gray value       0   %     
       Width                     1.00       TW                       (0% = not filled)          
       vertical spacing       0.00       CM                                
       horizontal spacing   0.00       CM

  • How to draw line in Text Box of crystal report

    Dear all expert,
    i have develop a crystal report, i need to underline the field heading. what i had done is, CTRL+U and edit my heading text. But it only underline what i type, the rest of the blank area of the field heading was not underline. how can i overcome this issues?
    Thank You.

    Hi,
    Instead of 'ctrl + u' the field, right click your text object, format text -> border -> enable the bottom with single
    Thx,
    Hao

  • How to draw vertical lines in SMART FORMS

    Hi Guys,
    Can anyone please let me know how to draw vertical and horizontal lines in smart forms, i have to do this in the secondary window.
    thanks,
    Ramesh

    Hi Ramesh,
    In the window output options you have option of check box to get lines.
    Then you need to give the spacing for vertical and horizontal.
    Another option is putting a template on window and getting the boxes, but it is quite little bit complex.
    Put the cursor on the WINDOW in which the lines you want.
    Right click on it>create>complex section.
    In that select the TEMPLATE radio button.
    Goto TAB TEMPLATE.
    Name: give some name of line.
    From: From coloumn.
    To: To coloumn
    Height: specify the height of the line.
    Next give the coloumn widths.
    Like this you can draw the vertical and horzontal lines.
    If the above option doesnot workout then u can try the below option also
    any how you can draw vertical and horizontal lines using Template and Table.
    for Template First define the Line and divide that into coloumns and goto select patterns and select the required pattern to get the vertical and horizontal lines.
    For table, you have to divide the total width of the table into required no.of columns and assign the select pattern to get the vertical and horizontal lines.
    if this helps, reward with points.
    Regards,
    Naveen

  • How to Draw diagonal lines in a SAP Script

    Hi All,
    I got a requirement to strike out a box with diagonal lines in SAP Script. My client is not interested in just shading out the box. He want atleast 3 or 4 diagonal lines to make feel the customer that the box is striken off.
    How can we do this ?
    Thanks & Regards,
    Bhupal

    Hi B,
    as u have the dimension of  the box..so create a box in paint as bmp.....with digonals as u required.....
    upload this image thru SE78...and call it in ur script.......
    and superimpose that graphic on the text box....
    hopefully this will solve ur problem...
    thnx
    rohit

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

  • How to draw a simple little line.

    I have a JApplet that loads images from a jar file. This applet can scale the images, and move them left right, up and down.
    I just want to be able to draw a line on top of the images and then erase it if needed. How do I do this?
    Currently, I have a the jpg images loaded into an Image, which is then converted to an ImageIcon, which is then used to create a JLabel, which is used to create a JScrollPane which finally gets added as a tab on a JTabbedPane.
    I was told to use BufferedImage but that didn't help me. Here is what I have currently:
    private void draw()
    //Get the current image to draw on
    JScrollPane jsp = (JScrollPane)m_tabbedPane.getSelectedComponent();
    JViewport port = jsp.getViewport();
    GrabAndScrollLabel gnsLabel = (GrabAndScrollLabel) port.getView();
    ImageIcon ii = (ImageIcon) gnsLabel.getIcon();
    BufferedImage bi = new BufferedImage (ii.getIconWidth(),
    ii.getIconHeight(),
    BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = bi.createGraphics();
    g2.setPaint(Color.blue);
    g2.drawLineRect(100, 200, 300, 500);
    g2.drawImage(ii.getImage(),null,null);
    ImageIcon newIcon = new ImageIcon(ii.getImage());
    gnsLabel.setIcon(newIcon);
    port.setView(gnsLabel);
    jsp.setViewport(port);
    getRootPane().revalidate();
    getRootPane().repaint();
    Please help. I can't believe it has to be this difficult to draw a little line.
    Thanks.

    I have a little more insight into my problem.
    I built a sample form Sun (the Map_Line sample). It looks like this:
    public class Map_Line extends Applet
    private BufferedImage bi;
    public Map_Line()
    setBackground(Color.white);
    Image img = getToolkit().getImage("bld.jpg");
    try
    MediaTracker tracker = new MediaTracker(this);
    tracker.addImage(img, 0);
    tracker.waitForID(0);
    catch (Exception e)
    int iw = img.getWidth(this);
    int ih = img.getHeight(this);
    bi = new BufferedImage(iw, ih, BufferedImage.TYPE_INT_RGB);
    Graphics2D big = bi.createGraphics();
    big.drawImage(img, 0, 0, this);
    public void paint(Graphics g)
    Graphics2D g2 = (Graphics2D) g;
    int w = getSize().width;
    int h = getSize().height;
    int bw = bi.getWidth(this);
    int bh = bi.getHeight(this);
    g2.drawImage(bi, null, 0, 0);
    g2.setColor(Color.white);
    g2.setStroke(new BasicStroke(5.0f));
    g2.drawLine(10, 10, bw - 10, bh - 10);
    public static void main(String[] s)
    WindowListener l = new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    Frame f = new Frame("Map_Line");
    f.addWindowListener(l);
    f.add("Center", new Map_Line());
    f.pack();
    f.setSize(new Dimension(350, 250));
    f.show();
    Note how the drawing is done in paint. This applet works just fine for me.
    The difference is that I'm trying to use the BufferedImage to get my Graphics2D object where as this one gets it from paint (casts Graphics to Graphics2D).
    This applet works just fine, but if you try to use the Graphics2D that comes back from the BufferedImage, it doesn't work!.
    For example, if I create a member variable:
    Graphics2D big;
    And then in paint do this:
    //Graphics2D g2 = (Graphics2D) g;
    Grahics2D g2 = big;
    It no longer works!
    So, it looks like I need to use something other than the
    BufferedImage.createGraphics() to get the Graphics2D object I need.
    Does this seem right?
    Thanks!

Maybe you are looking for

  • Cant install Acrobat 8 standard with disk?

    Running a Dell widows 7 can't  run acrobat disk any ideas?

  • FrameMaker 8.0 to HTML

    Could you please tell me whether WebWorks Publisher Standard Edition 8.0 is included in FrameMaker 8.0 or not? Some advertisements on web sites say YES!

  • IE5 and Netscape with WLS 5.1

    Hi, I sent this out a couple of weeks ago. I have tried the solution but with no success could some one please help... We are using Weblogic 5.1 Service Pack 8 on Solaris 2.6, with Apache server acting as a bridge. Apache actually does not serve any

  • IPhoto albums lost after back-up

    1. I just did a time machine backup for the first time. When I went back to my IMAC the albums in IPhoto were all gone. All my photos still appear to be on the computer but the albums are gone. Where did my albums go and how do I get them back?

  • TNS Listener unstable.

    Hi, I am experiencing problems with TNS listener with my Oracle8 in my NT machine. In the services, it shows that it is started but it refused to connect. But when I try to stop it, it prompts me that it was not started. I believe that there is a syn