How do we make a new same object built on the site?



  • There's a window like this:

    введите сюда описание изображения

    The letters are objects.

    public class Charimage {
        public int x;
        public int y;
        public String c;
        public BufferedImage image; 
        public Graphics g;
    ...
    

    To finish the class. Charimageso that the same letter would be created in the letter and it could be moved without leaving the mice button to the left colour field and let it stay?

    P.Op just started digging, so the kettle still )



  • You should be like,

    1. For one button object, create 2, one above the other.
    2. Put something on the top. DragAndDropMotionListener (Pseudo class, in reality can be called differently)
    3. At the beginning of the motion, put a new button instead of the moving button and put the same listener on it.
    4. At the time of discontinuation, remove the transferable button and position a new 2-block poster on the top

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2