With draw... class

i use swing to make applet. I use filloval, drawRectangle,..... to make draw. But i need the oval, rectangle taht i did to be movable (ex.: like when you move a shortcut on your desktop, you create it, but you can always move it on the desktop). I want to be able to move one oval or rectangle by clicking on it and just drag the mouse where i want it.
sorry for my english
thx to help me

This is a sample with an extra bonus.
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
public class DragD extends JApplet
public void init()
     getContentPane().setLayout(null);
     JP jp1 = new JP(1);
     JP jp2 = new JP(2);
     getContentPane().add(jp1);
     getContentPane().add(jp2);
class JP extends JComponent implements MouseListener, MouseMotionListener
     int    type;
     int    mx,my;
     Cursor movC = new Cursor(Cursor.MOVE_CURSOR);
     Cursor defC = new Cursor(Cursor.DEFAULT_CURSOR);     
public JP(int i)
     type = i;
     setBounds(i*20,i*30,20,20);
     addMouseListener(this);
     addMouseMotionListener(this);
public void paintComponent(Graphics g)
     if (type == 1) g.fillOval(1,1,18,18);
     if (type == 2) g.fillRect(1,1,18,18);
public void mousePressed(MouseEvent m)
     mx = m.getX();
     my = m.getY();
     setBorder(new MatteBorder(1,1,1,1,Color.red));
public void mouseDragged(MouseEvent m)
     if (getCursor() != movC) setCursor(movC);
     setLocation(getX()+m.getX()-mx,getY()+m.getY()-my);
public void mouseReleased(MouseEvent m)
     setBorder(null);
     setCursor(defC);
public void mouseEntered(MouseEvent m){}
public void mouseExited(MouseEvent  m){}
public void mouseMoved(MouseEvent   m){}
public void mouseClicked(MouseEvent m){}
Noah
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
public class DragD extends JApplet
public void init()
     getContentPane().setLayout(null);
     JP jp1 = new JP(1);
     JP jp2 = new JP(2);
     getContentPane().add(jp1);
     getContentPane().add(jp2);
class JP extends JComponent implements MouseListener, MouseMotionListener
     int type;
     int mx,my;
     Cursor movC = new Cursor(Cursor.MOVE_CURSOR);
     Cursor defC = new Cursor(Cursor.DEFAULT_CURSOR);     
public JP(int i)
     type = i;
     setBounds(i*20,i*30,20,20);
     addMouseListener(this);
     addMouseMotionListener(this);
public void paintComponent(Graphics g)
     if (type == 1) g.fillOval(1,1,18,18);
     if (type == 2) g.fillRect(1,1,18,18);
public void mousePressed(MouseEvent m)
     mx = m.getX();
     my = m.getY();
     setBorder(new MatteBorder(1,1,1,1,Color.red));
public void mouseDragged(MouseEvent m)
     if (getCursor() != movC) setCursor(movC);
     setLocation(getX()+m.getX()-mx,getY()+m.getY()-my);
public void mouseReleased(MouseEvent m)
     setBorder(null);
     setCursor(defC);
public void mouseEntered(MouseEvent m){}
public void mouseExited(MouseEvent m){}
public void mouseMoved(MouseEvent m){}
public void mouseClicked(MouseEvent m){}

Similar Messages

  • Control Animated Gif with ImageAnimator Class

    Here is something I just found that some of you may like. You can use the
    ImageAnimator Class to run Animated Gifs in vb.net.
    Public Class Form9
    Private animatedImage As Bitmap = Image.FromFile("C:\bitmaps\animated gifs\hopping rabbit 2 - animated.gif")
    Private Sub Form9_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Button1.Text = "Start"
    Me.BackColor = Color.Teal
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If Button1.Text = "Stop" Then
    ImageAnimator.StopAnimate(animatedImage, New EventHandler(AddressOf Me.OnFrameChanged))
    Button1.Text = "Start"
    Else
    'Begin the animation.
    ImageAnimator.Animate(animatedImage, New EventHandler(AddressOf Me.OnFrameChanged))
    Button1.Text = "Stop"
    End If
    End Sub
    Private Sub Form9_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
    'Get the next frame ready for rendering.
    ImageAnimator.UpdateFrames()
    'Draw the next frame in the animation.
    e.Graphics.DrawImage(Me.animatedImage, New Point(0, 0))
    End Sub
    Private Sub OnFrameChanged(ByVal o As Object, ByVal e As EventArgs)
    'Force a call to the Paint event handler.
    Me.Invalidate()
    End Sub
    End Class

    Hey Tom,
     Yes the ImageAnimator is a handy class for showing animated Gif images. I looked at it when making the Playback panel on my Gif Creator program. I could not use it though because, i would of had to create the Gif image before i could play it back
    and being my images are all single images i was stuck using a Timer to show each one.
     I wish there was a way to use a list of single images with this class. It would have been much less work.   8)
    If you say it can`t be done then i`ll try it
    Yeah, I see that it is not enough for your Gif Creator.
    I just did not know about it and was using the gif strip to manually make a list of all the gif frames and showing individually with a timer. This class does it and a couple other things much easier.

  • Issue with a class extending EventHandler MouseEvent

    Hello all,
    I originally had a nested class that was a used for mouseEvents. I wanted to make this it's own class, so I can call it directly into other class objects I have made, but for some reason it isn't working and I'm getting an eror
    here is the code:
    public class MouseHandler implements EventHandler<MouseEvent>
        private double sceneAnchorX;
        private double sceneAnchorY;
        private double anchorAngle;
        private Parent parent;
        private final Node nodeToMove ;
       MouseHandler(Node nodeToMove)
           this.nodeToMove = nodeToMove ;
        @Override
        public void handle(MouseEvent event)
          if (event.getEventType() == MouseEvent.MOUSE_PRESSED)
            sceneAnchorX = event.getSceneX();
            sceneAnchorY = event.getSceneY();
            anchorAngle = nodeToMove.getRotate();
            event.consume();
          else if (event.getEventType() == MouseEvent.MOUSE_DRAGGED)
              if(event.isControlDown())
                  nodeToMove.setRotationAxis(new Point3D(sceneAnchorY,event.getSceneX(),0));
                  nodeToMove.setRotate(anchorAngle + sceneAnchorX -  event.getSceneX());
                  sceneAnchorX = event.getSceneX();
                  sceneAnchorY = event.getSceneY();
                  anchorAngle = nodeToMove.getRotate();
                  event.consume();
              else
                double x = event.getSceneX();
                double y = event.getSceneY();
                nodeToMove.setTranslateX(nodeToMove.getTranslateX() + x - sceneAnchorX);
                nodeToMove.setTranslateY(nodeToMove.getTranslateY() + y - sceneAnchorY);
                sceneAnchorX = x;
                sceneAnchorY = y;
                event.consume();
          else if(event.getEventType() == MouseEvent.MOUSE_CLICKED)
            //  nodeToMove.setFocusTraversable(true);
               nodeToMove.requestFocus();
               event.consume();
                         nodeToMove.setOnKeyPressed((KeyEvent)
    ->{
         if(KeyCode.UP.equals(KeyEvent.getCode()))
             nodeToMove.setScaleX(nodeToMove.getScaleX()+ .1);
             nodeToMove.setScaleY(nodeToMove.getScaleY()+ .1);
             nodeToMove.setScaleZ(nodeToMove.getScaleZ()+ .1);
             System.out.println("kaw");
             KeyEvent.consume();
         if(KeyCode.DOWN.equals(KeyEvent.getCode()))
             if(nodeToMove.getScaleX() > 0.15)
             nodeToMove.setScaleX(nodeToMove.getScaleX()- .1);
             nodeToMove.setScaleY(nodeToMove.getScaleY()- .1);
             nodeToMove.setScaleZ(nodeToMove.getScaleZ()- .1);
             System.out.println(nodeToMove.getScaleX());
             KeyEvent.consume();
         nodeToMove.setOnScroll((ScrollEvent)
                 ->{
             if(nodeToMove.isFocused())
                        if(ScrollEvent.getDeltaY() > 0)
                            nodeToMove.setTranslateZ(10+nodeToMove.getTranslateZ());
                        else
                            nodeToMove.setTranslateZ(-10+nodeToMove.getTranslateZ());
           ScrollEvent.consume();
    }This is the class where I call it.
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.Box;
    * @author Konrad
    public class Display extends Pane
        Box b;
        PhongMaterial pm = new PhongMaterial(Color.GRAY);
        public Display(Double x, Double y,Double width, Double height)
             super();
             b = new Box(width, height,10);
             setPrefSize(width,height);
             relocate(x, y);
             b.setMaterial(pm); 
             b.addEventFilter(MouseEvent.ANY, new MouseHandler(this));
             getChildren().add(b);
    }There is no red dot stating the class doesn't exist, or anything is wrong, but when I run it I get an error.
    here is the error:
    C:\Users\Konrad\Documents\NetBeansProjects\3D\src\3d\Display.java:29: error: cannot find symbol
             b.addEventFilter(MouseEvent.ANY, new MouseHandler(this));
      symbol:   class MouseHandler
      location: class DisplayThis is another class from the one that it was originally "nested" in(sorry if I'm not using correct terms). The other class, as well as this, produce the same error(this one was just smaller and eaiser to use as an example).
    The code is exactly the same.
    Originally I thought that the MouseEvent class wasn't an FX class, so I switched it and thought it worked, tried it on the Display class it didn't, tried it on the first one and yeah still didn't, so not too sure what happened there :(.
    Thanks,
    ~KZ
    Edited by: KonradZuse on Jun 7, 2013 12:15 PM
    Edited by: KonradZuse on Jun 7, 2013 12:38 PM
    Edited by: KonradZuse on Jun 7, 2013 12:39 PM

    Last time that was the issue I was having for a certain case; however this seems to be different, here is the list of imports for each class.
    MouseHandler:
    import javafx.event.EventHandler;
    import javafx.geometry.Point3D;
    import javafx.scene.Node;
    import javafx.scene.Parent;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.MouseEvent;Display:
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.Box;draw:
    import java.io.File;
    import java.sql.*;
    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.geometry.Rectangle2D;
    import javafx.scene.Group;
    import javafx.scene.PerspectiveCamera;
    import javafx.scene.PointLight;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.control.Menu;
    import javafx.scene.control.MenuBar;
    import javafx.scene.control.MenuItem;
    import javafx.scene.control.TextField;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DataFormat;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.TriangleMesh;
    import javafx.stage.FileChooser;
    import javafx.stage.FileChooser.ExtensionFilter;
    import javafx.stage.Screen;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import jfxtras.labs.scene.control.window.Window;
    import org.controlsfx.dialogs.Action;
    import org.controlsfx.dialogs.Dialog;Edited by: KonradZuse on Jun 7, 2013 2:27 PM
    Oddly enough I tried it again and it worked once, but the second time it error-ed out again, so I'm not sure what the deal is.
    then I ended up getting it to work again in the draw class only but when I tried to use the event I get this error.
    J a v a M e s s a g e : 3 d / M o u s e H a n d l e r
    java.lang.NoClassDefFoundError: 3d/MouseHandler
         at shelflogic3d.draw.lambda$5(draw.java:331)
         at shelflogic3d.draw$$Lambda$16.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
         at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
         at javafx.event.Event.fireEvent(Event.java:202)
         at javafx.scene.Scene$DnDGesture.fireEvent(Scene.java:2824)
         at javafx.scene.Scene$DnDGesture.processTargetDrop(Scene.java:3028)
         at javafx.scene.Scene$DnDGesture.access$6500(Scene.java:2800)
         at javafx.scene.Scene$DropTargetListener.drop(Scene.java:2771)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$3.run(GlassSceneDnDEventHandler.java:85)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$3.run(GlassSceneDnDEventHandler.java:81)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(GlassSceneDnDEventHandler.java:81)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(GlassViewEventHandler.java:595)
         at com.sun.glass.ui.View.handleDragDrop(View.java:664)
         at com.sun.glass.ui.View.notifyDragDrop(View.java:977)
         at com.sun.glass.ui.win.WinDnDClipboard.push(Native Method)
         at com.sun.glass.ui.win.WinSystemClipboard.pushToSystem(WinSystemClipboard.java:234)
         at com.sun.glass.ui.SystemClipboard.flush(SystemClipboard.java:51)
         at com.sun.glass.ui.ClipboardAssistance.flush(ClipboardAssistance.java:59)
         at com.sun.javafx.tk.quantum.QuantumClipboard.flush(QuantumClipboard.java:260)
         at com.sun.javafx.tk.quantum.QuantumToolkit.startDrag(QuantumToolkit.java:1277)
         at javafx.scene.Scene$DnDGesture.dragDetectedProcessed(Scene.java:2844)
         at javafx.scene.Scene$DnDGesture.process(Scene.java:2905)
         at javafx.scene.Scene$DnDGesture.access$8500(Scene.java:2800)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3564)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3379)
         at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3331)
         at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1612)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2399)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:312)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:237)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:354)
         at com.sun.glass.ui.View.handleMouseEvent(View.java:514)
         at com.sun.glass.ui.View.notifyMouse(View.java:877)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
         at java.lang.Thread.run(Thread.java:724)
    Caused by: java.lang.ClassNotFoundException: shelflogic3d.MouseHandler
         at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:353)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         ... 50 more
    Exception in thread "JavaFX Application Thread" E..........After the E comes a bunch of random stuff with drag and drop and such (since I'm dragging an item, and then creating it and giving it the event in question).
    Line 331 is                      b.addEventHandler(MouseEvent.ANY, new MouseHandler(b));

  • How do i open a web page with VeriSign Class 3 Extended Validation SSL SGC SS CA certfificate i can't open web pages with this, how do i open a web page with VeriSign Class 3 Extended Validation SSL SGC CA certfificate i can't open web pages with this

    how do i open a web page with VeriSign Class 3 Extended Validation SSL SGC SS CA ?

    Hi
    I am not suprised no one answered your questions, there are simply to many of them. Can I suggest you read the faq on 'how to get help quickly at - http://forums.adobe.com/thread/470404.
    Especially the section Don't which says -
    DON'T
    Don't post a series of questions in  a single post. Splitting them into separate threads increases your  chances of a quick answer.
    PZ
    www.pziecina.com

  • Report of posted Deprecation with ASSET CLASS

    Hi Gurus,
    We require a depreciation simuation report with Asset class as mandatory one.
    Could you please tell me path and t-code for the above said report.
    Regards,
    Praveen.

    Hi Praveen,
    You mentined before you wanted to view depreciation simulation, for this RASIMU02 is the report to use.
    However, if you want to see depreciation planned /and or posted you can use the Asset Balance RABEST_ALV01. If you click on the indicator  "current book value" you will see the actually posted depreciation and current Netbook Value. Also in this report you can enter the Asset Class in the selection parameters.
    Regarding viewing the note I forwarded to you previously: you can view it via the SAP Portal - http://help.sap.com/. If you go to SAP ERP tab, you will see on the right hand side pannel a link to SAP Notes. Here you can view any note.
    I hope this helps further.
    Kind regards,
    Brigitte

  • How can i erase an account with relationship with some class of tax

    how can i erase an account with relationship with some class of tax

    Hi Enrique,
    I am not sure what you mean by this, can you please explain in more detail? You cannot erase accounts that already have transactions posted to it.
    Hope it helps,
    Adele

  • Is Verizon going to end up with a Class Action Lawsuit regarding the Trade-In Scam?

    I notice I'm not the first to report this issue.  In fact, after reading the horror stories in the community, I'm questioning if going with Verizon Wireless and/or using their online trade-in program was the right thing to do.  I see so many other people experiencing the same nightmare, I figure it's just a matter of time until there's a Class Action Lawsuit against them regarding their Trade-in Scam of 2014.
    I was lured to Verizon by their promotion of receiving $200 for my iPhone 4s.  I pre-ordered my iPhone 6 online on 9/12.  Following the check-out, I was given the option to complete the online trade-in program.  My iPhone 4s was in perfect condition as it was kept in a LifeProof case since day 1.  Being in that condition made it eligible for the full $200 trade-in value.
    My iPhone 6 arrived on time.  I transferred my data from the iPhone 4s to the iPhone 6.  Then ensured the 'find my phone' feature was turned off, all passwords unlocked and factory reset completed.  Then I fully charged the phone and turned it off prior to packing into the provided trade-in program materials/envelope.
    I was a little concerned about the trade-in program materials/envelope.  The envelope itself was nothing more than a padded envelope.  It was a pre-printed business reply envelope.  No tracking number other than a bar code with my submission id on it and then stamped with the word PROMO.  I was hesitant to drop it in a mailbox so I took it right into my local post office.  That was on 9/23.
    I started checking the trade-in status a week later but the status was 'Not Received'.  Another week later, same thing.  Finally, I reached out to the trade-in program via email on 10/11.  I received a 'canned' response back on 10/16 that I should wait 4-6 weeks for my gift card.  That time period includes a 2-3 for inspection and processing from the date of receipt at the warehouse.
    On 10/25, I reached out again to the trade in program via email.  On 10/26, I received the very same response... word for word.  I reached out again on 11/7 and they didn't even reply.  I tried calling but got no where by phone.  They claim they'll escalate the issue but I never hear back.
    I really feel scammed out of $200 by using this online trade-in program.  The guideline stipulated that I must use the supplied packing materials and envelope or the promotion amount would not be guaranteed; however, without tracking there is no way to know where the phone is.
    Come on Verizon...  you lured me in, now do the right thing and send me the $200 gift card I was promised.

    I've gone through the same process as you've described with a different twist. They advised me that the screen on
    my phone was cracked. They are sending me $36 instead of the Appraised Value of $200.  I'm not an Attorney
    but I would bet it would be an easy win over Verizon in a Class Action, because this whole process smells
    bad. There must be tens of thousands of people getting ripped off and they're not all liars, which is what Verizon would have a judge believe. Contract or no contract, most states prohibit Agreements that would negate consumer protection
    from fraudulent business practices.
    Verizon may play hardball with it's disenchanted customers and there isn't much you can do as an individual.
    This just happened with me on one phone and I'm waiting for news of a second phone that I sent at the same time.
    In the meantime I will visit the Verizon Store and talk to the salesperson who sold me the two new iPhone 6's
    and see what he can do. I will also contact my local Better Business Bureau office for their advice. If there's no satisfaction, I will keep the phones, stop paying my bill and get a new carrier. They can take me to court, but I will be there first in@ Small Claims Court. I'm retired so I have time to do this stuff, but most people can't, so the best bet is still a
    good Lawyer with a Class Action Suit and lots of negative publicity in the papers and the internet.

  • ABAP Objects with Workflows / Classes and Instances

    Hello,
    I am currently designing a workflow using an ABAP-Objects. So far I have been been able to get my Workflow to run with my class, but I have a couple of problems:
    - I am using the Function 'SAP_WAPI_START_WORKFLOW' to start other subflows, which enables me to decide which subflow to start at runtime. All of the subflows have standart importing-parameters in their containers, such as the key of my class. In each workflow I instantiate my class using a self-written method, which checks the table T_INSTANCES in my object, and then either returns the object reference to an existing instance or creates a new one. Obviously all of the subflows that I call from my main workflow should be able to find the instance. As far as I can see in their protocolls, this happens without any problems. The problem starts when I make changes to the instance. For example the changing of attributes (with setter methods) seems not to work. After the subflows are finished, in my main workflow, I do not see (with getter methods) any changes that has been made to the object. Is local persistence really limited to one workflow ?
    - My second problem is basically about the workflow container in workflow protocoll. In the same workflow, I can change the attributes of my object. Nevertheless, the protocoll always show the initial attribute, even though, my task with the getter-method returns the new value of the attribute.
    I appreciate any help and thanks a lot in advance.

    Hello Pauls,
    Thank you for your answer. I think we are misunderstanding each other. The problem occurs (I think) because my class is not a singleton class. Or am I mistaken ?
    When I directly start a subflow from my main workflow, then the instance that I have created in my main workflow is also visible to the subflow. As well as the static table which actually keeps track of the instances. So, in this case the subflows finds the instance and then can use the object as is.
    When I start a subflow from my main workflow using the function I mentioned above, then even though the same object key is used, there is a new instance. And the static table (I assume that you mean a static variable from type table, when you say "class table") is completely empty. In this case, my "new" instance is created which overwrites every attribute that I have set in the main workflow, before I started the subflow. More interestingly, my main workflow instantiates another new object, as soon as the subflow has finished. (I am using an event to wait for the subflow to finish.)
    On the other hand, I am not quite sure that I understood your approach with refresh and how it could help me. This method is not well documented anywhere, and all of the examples that I have found are about "leave it empty"
    As far as I understood, this method is called by the workflow between the steps, when an object is used. I slowly start to think that I need advanced information about Workflows and Memory Management.
    Thanks a lot again. Apparently, I am the only person who came across such a problem
    Greetz
    G.Fendoglu

  • Trouble with Drawing Markups in Acrobat Pro XI

    Hello all and thank you for any help that comes out of this.
    I use Acrobat XI for several forms for work.  They are timesheets.  I created these forms from another PDF that was given to me.  Part of the use of these forms involves adding Drawing Markups and editing the Markups later.  The Markups in this case are simple lines.  In Acrobat 9, this was an easy task.  I could easily grab the Markups I had inserted and manipulate them any way I chose.
    Now, in Acrobat XI, once I insert a line, I basically can no longer touch it without doing a very clumsy work-around.  Every once in a great while, I get lucky and am able to get my mouse over that one magic hidden pixel and then I can grab the Markup and do what I need.
    It just seems much, much more difficult working with Drawing Markups in the new version.
    Am I doing something wrong?  Is there an option I don't know about?
    Thank you in advance.
    Dave

    Gilad:
    The only choices Acrobat XI gives me are the "Selection tool for text and images" and the hand-shaped "Click to pan around the document" button.
    There is a "Tool Set" option under the View menu, but there is no "Interactive Objects" submenu.
    Please note the image I have included of the toolbar that I am presented with in Acrobat XI. Does the button you are suggesting I use exist anymore?  I haven't seen it since Acobat 9 and I have scanned through menus and see no way to add another Selection Tool to the toolbar. If it does exist, please tell me how to turn it on.
    Thank you!

  • How to create a Jar with only class files?

    Dear all,
    I want to create a jar file with only classes.My class files and java files are in different folders under com .
    say
    com
    in com there are two folders
    folder 1 -- subfolder 1
    folder 2 -- subfolder 2
    like this.
    If i want to create a jar file from com directory how should i give the jar command.Again my jar should contain only .class files.
    Any help will be appreciated
    Thanks
    lekshmi

    It doesn't work.Says "No such class or directory"
    Any other way Or is it possible to do so?Read the link I posted and create the statement to make your structure. I was thinking you were inside the com directory but if you are above it you will need something like this instead:
    jar -cf test.jar com\*.class com\subfolder1\*.class com\subfoler2\*.class
    But either way don't just copy and past this. Think about what is does so that you can make it work for you.
    Also, you might want to look into using Ant if you are going to be building this a lot.

  • Problem with loading classes!!!

    I am loading classes using
    // Open File
    InputStream jarFile = new BufferedInputStream(new FileInputStream(
    pluginPath));
    // Get Manifest and properties
    Attributes attrs = new JarInputStream(jarFile).getManifest().
    getMainAttributes();
    jarFile.close();
    // Read Main Class
    String mainClass = attrs.getValue("Protocol-Class");
    // Load all classes from jar file without giving classpath
    URL url = new URL("jar:file:" + pluginPath + "!/");
    JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
    URL[] urls = new URL[] {
    url};
    ClassLoader classLoader = new URLClassLoader(urls);
    // Create new instance of protocol
    Protocol protocol = (Protocol) classLoader.loadClass(mainClass).
    newInstance();
    I am loading classes one by one say a order A, B, C. In my case class c extends class A. So I am loading class A first and later B and finally C. But I am getting exceptions when loading class C that Class A is unknown.The following exception is thrown
    java.lang.NoClassDefFoundError: com/a/A at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    Please give me a solution to make it run.

    You create a new class loader for each class. The class loaders are independent, and so the class hierarchies they load are independent. Class A loader by classLoaderOne doesn't see class B loader by classLoaderTwo - they are loaded into their own sandboxes.
    Either load everything with one class loader or create the class loaders in a hierarchy. To create a hierarchy use the class loader constructor that takes a parent class loader as a parameter. One class loader may be easier because then you don't need to worry about loading order.

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • How to read a xml file with StringReader class

    Hi,
    I need to read a XML document with StringReade class. My aplication receives an absolute path but this doesn't work:
    StringReader oStringReader =
    new StringReader(c:\java\libros.xml);
    However it works with:
    StringReader oStringReader =
    new StringReader("<?xml version="1.0" e......");
    ie, with the whole document as a String, but I need to do it as the frist way.
    Thanks

    Hi,
    I need to read a XML document with StringReade class.
    My aplication receives an absolute path but this
    doesn't work:
    StringReader oStringReader =
    new StringReader(c:\java\libros.xml);
    However it works with:
    StringReader oStringReader =
    new StringReader("<?xml version="1.0" e......");
    ie, with the whole document as a String, but I need
    to do it as the frist way.
    Thankstake a look at this link:
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html

  • How can servlet return the output as html content with drawing picture?

    Does anybody know how can a servlet return the output as html content with drawing picture?
    The drawing picture is drawn at runtime by the servlet.

    Thanks, BalusC.
    But I am not sure if I understand your reply fully.
    From my understanding, you are telling me to first generate a html from a servlet with the image <IMG> tag pointing to a servlet which will be responsible to generate an image?
    For example, <IMG SRC="http://myserver/servlet/testservlet">
    Could you confirm this?

  • How to complie an application with many classes?

    I build an application with many classes,
    java palm.database.MakePalmApp -v -version "1.0" -icon 1.bmp -bootclasspath %j2meclasspath% -networking -classpath output %1
    this only works with only one class, I do not know if I have an application with several classes how can I convert them into a prc??

    Take a look at the mksample.bat file that came with
    midp4palm:
    java -jar MakeMIDPApp.jar -version 1.0 -type Data -creator mJav -nobeam -v -o ManyBalls_new.prc -JARtoPRC ManyBalls.jar example.manyballs.ManyBalls
    You will need to create a jar file consisting of the
    classes for your application, and then run it through
    a statement like above.
    Perry

  • Drawing class and package

    My program is about drawing class diagram,package,object and interface�
    I have just done only for package and class diagram
    When I click on the classdiagram icon from my toolbox, it draws a class diagram,but when I then click on the package icon, a package is drawn but the class diagram disappears�..and when I then click again on the classdiagram icon, the package disappears and the previous class diagram reappears,,,,so why??/
    What is the problem?? Is it wiz the viewport??? How can I draw both a class and a package�
    IN MY MAIN MENU I INCLUDE THIS CODE:
    public MainMenu (String title,ProjectDoc doc) {
         super (title,null);
         setResizable(true);
         doc = new ProjectDoc(this);
         this.doc = doc;
         classView = new ClassView(doc,this);
         packageView = new PackageView(doc,this);
              Container content = getContentPane();
        content.setLayout(new BorderLayout());
        JToolBar toolBar = new JToolBar();
        content.add (toolBar, BorderLayout.NORTH);
         classView.setPreferredSize (new Dimension(6000,3500));
         packageView.setPreferredSize(new Dimension(6000,3500));
        drawingPane = new JScrollPane (
                       ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                       ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        drawingPane.setViewportView(classView);
      drawingPane.setViewportView(packageView);plzzz help me it is very urgent

    Hi,
    call chapter4.Drawing.class
    <applet code="chapter4.Drawing.class" width="100"
    height="100"> </applet>Regards,
    Ram

Maybe you are looking for

  • Project Resource Management

    Given all of the Oracle Project solutions out there (EBS, Primavera, Fusion, PeopleSoft), which of these is the best choice for a company that would like to do resource allocation, forecasting, etc? (taking Oracle's longterm vision in this area into

  • WiFi issue with MAC address

    I've been using MAC filtering as part of my home network wireless security for years. This means inputting the MAC address of every device and computer that I want to have connect to my network. So I get my new WiFi + 3G iPad on May 28th and look in

  • Why is the "iDVD" gray in the Share menu?

    I want to burn a movie to DVD. In the Share menu, the iDVD is gray and cannot be selected. This is not true for other projects. How do I find out why and how do I fix it? Thanks in advance for your help. Love & Peace, Grace

  • J'ai importer des CD sur iTunes et entrer toutes les infos une par une sauf que quand je regarde le fichiers dans l'explorateur windows, il n'y a que le titre et rien d'autre

    J'ai importer des CD sur iTunes et entrer toutes les infos une par une sauf que quand je regarde le fichiers dans l'explorateur windows, il n'y a que le titre et rien d'autre. Comment faire pour que les infos des musiques iTunes sois les memes sur le

  • Trouble Installing iTunes 8

    I have a ACER ASPIRE 5315 (OS Vista). I had iTunes 7 but started having problems, so unistalled (COMPLETELY). Trying to install iTunes 8 but keep getting error message *'The folder path "C:" contains an invalid character'* I have downloaded and saved