Java Shapes Bouncing App

Java Shapes Bouncing App

hi guys,

im trying to implement the following into my java app code:

Here's my code: first ill post the main class, then the animation panel class, then moving shape and moving rectangle class...the additional files like the shape gif and path gifs are here, youll also find all the info need in here and the code files:

here's the main

/*
 *  =============================================================
 *  A1.java : Extends JApplet and contains a panel where
 *  shapes move around on the screen. Also contains start and stop
 *  buttons that starts animation and stops animation respectively.
 *  ==============================================================
 */

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
import javax.swing.event.*;
import java.util.Vector;

public class A1 extends JApplet {
    AnimationPanel panel;   // panel for bouncing area
    JButton startButton, stopButton;    //buttons to start and stop the animation

    /** main method for A1
     */
    public static void main(String[] args) {
        A1 applet = new A1();
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(applet, BorderLayout.CENTER);
        frame.setTitle("Bouncing Application");
        applet.init();
        applet.start();
        frame.setSize(500, 500);
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = frame.getSize();
        frame.setLocation((d.width - frameSize.width) / 2, (d.height - frameSize.height) / 2);
        frame.setVisible(true);
    }

    /** init method to initialise components
     */
    public void init() {
        panel = new AnimationPanel();
        add(panel, BorderLayout.CENTER);
        add(setUpToolsPanel(), BorderLayout.NORTH);
        add(setUpButtons(), BorderLayout.SOUTH);
        addComponentListener(
            new ComponentAdapter() { // resize the frame and reset all margins for all shapes
                public void componentResized(ComponentEvent componentEvent) {
                    panel.resetMarginSize();
             }
         });
    }

    /** Set up the tools panel
    * @return toolsPanel        the Panel
     */
    public JPanel setUpToolsPanel() {
        //Set up the shape combo box
        ImageIcon rectangleButtonIcon = createImageIcon("rectangle.gif");
        JComboBox<ImageIcon> shapesComboBox = new JComboBox<ImageIcon>(new ImageIcon[] {rectangleButtonIcon} );
        shapesComboBox.setToolTipText("Set shape");
        shapesComboBox.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JComboBox cb = (JComboBox)e.getSource();
                //set the default shape type based on the selection: 0 for Circle, 1 for Rectangle
                panel.setCurrentShapeType(cb.getSelectedIndex());
            }
        });
        //Set up the path combo box
        ImageIcon fallingButtonIcon = createImageIcon("falling.gif");
        ImageIcon boundaryButtonIcon = createImageIcon("boundary.gif");
        JComboBox<ImageIcon> pathComboBox = new JComboBox<ImageIcon>(new ImageIcon[] {boundaryButtonIcon, fallingButtonIcon});
        pathComboBox.setToolTipText("Set Path");
        pathComboBox.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JComboBox cb = (JComboBox)e.getSource();
                //set the default path type based on the selection from combo box: 0 for Boundary Path, 1 for Falling Path
                panel.setCurrentPathType(cb.getSelectedIndex());
            }
        });
        //Set up the height TextField
        JTextField heightTxt = new JTextField("20");
        heightTxt.setToolTipText("Set Height");
        heightTxt.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JTextField tf = (JTextField)e.getSource();
                try {
                    int newValue = Integer.parseInt(tf.getText());
                    if (newValue > 0)
                        panel.setCurrentHeight(newValue);
                } catch (Exception ex) {
                    tf.setText("20");
                }
            }
        });
        //Set up the width TextField
        JTextField widthTxt = new JTextField("20");
        widthTxt.setToolTipText("Set Width");
        widthTxt.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JTextField tf = (JTextField)e.getSource();
                try {
                    int newValue = Integer.parseInt(tf.getText());
                    if (newValue > 0)
                        panel.setCurrentWidth(newValue);
                } catch (Exception ex) {
                    tf.setText("20");
                }
            }
        });

        JPanel toolsPanel = new JPanel(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.weightx=1;
        add(toolsPanel, new JLabel(" Shape: ", JLabel.RIGHT), gbc, 0, 0, 1, 1);
        add(toolsPanel, shapesComboBox, gbc, 1, 0, 1, 1);
        add(toolsPanel, new JLabel(" Path: ", JLabel.RIGHT), gbc, 2, 0, 1, 1);
        add(toolsPanel, pathComboBox, gbc, 3, 0, 1, 1);
        add(toolsPanel, new JLabel(" Height: ", JLabel.RIGHT), gbc, 4, 0, 1, 1);
        add(toolsPanel, heightTxt, gbc, 5, 0, 1, 1);
        add(toolsPanel, new JLabel(" Width: ", JLabel.RIGHT), gbc, 6, 0, 1, 1);
        add(toolsPanel, widthTxt, gbc, 7, 0, 1, 1);
        return toolsPanel;
    }

    /** Set up the buttons panel
         * @return buttonPanel      the Panel
     */
    public JPanel setUpButtons() {
        JPanel buttonPanel= new JPanel(new FlowLayout());
        //Set up the start button
        startButton = new JButton("Start");
        startButton.setToolTipText("Start Animation");
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                startButton.setEnabled(false);
                stopButton.setEnabled(true);
                panel.start();  //start the animation
            }
        });
        //Set up the stop button
        stopButton = new JButton("Stop");
        stopButton.setToolTipText("Stop Animation");
        stopButton.setEnabled(false);
        stopButton.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                stopButton.setEnabled(false);
                startButton.setEnabled(true); //stop the animation
                panel.stop();
             }
        });
        // Slider to adjust the speed of the animation
        JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 200, 30);
        slider.setToolTipText("Adjust Speed");
        slider.addChangeListener(new ChangeListener() {
         public void stateChanged(ChangeEvent e) {
             JSlider source = (JSlider)e.getSource();
             if (!source.getValueIsAdjusting()) {
                 int value = (int) (source.getValue()); // get the value from slider
                 TitledBorder tb = (TitledBorder) source.getBorder();
                 tb.setTitle("Anim delay = " + String.valueOf(value) + " ms"); //adjust the tilted border to indicate the speed of the animation
                 panel.adjustSpeed(value); //set the speed
                 source.repaint();
             }
            }
        });
        TitledBorder title = BorderFactory.createTitledBorder("Anim delay = 30 ms");
        slider.setBorder(title);
        // Add buttons and slider control
        buttonPanel.add(startButton);
        buttonPanel.add(stopButton);
        buttonPanel.add(slider);
        return buttonPanel;
    }

    /** create the imageIcon
     * @param   filename        the filename of the image
     * @return ImageIcon        the imageIcon
     */
    protected static ImageIcon createImageIcon(String filename) {
        java.net.URL imgURL = A1.class.getResource(filename);
        return new ImageIcon(imgURL);
    }

    /** Adds a component to a Panel.
            @param p is the panel
            @param c is the component to add
            @param gbc the grid bag constraints
            @param x the grid bag column
            @param y the grid bag row
            @param w the number of grid bag columns spanned
            @param h the number of grid bag rows spanned
     */
     private void add(JPanel p, Component c, GridBagConstraints gbc, int x, int y, int w, int h) {
            gbc.gridx = x;
            gbc.gridy = y;
            gbc.gridwidth = w;
            gbc.gridheight = h;
            p.add(c, gbc);
     }
}

Here's the Animation panel class:

/*
 *  ======================================================================
 *  AnimationPanel.java : Moves shapes around on the screen according to different paths.
 *  It is the main drawing area where shapes are added and manipulated.
 *  It also contains a popup menu to clear all shapes.
 *  ======================================================================
 */

import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;

public class AnimationPanel extends JComponent implements Runnable {
    private Thread animationThread = null;  // the thread for animation
    private ArrayList<MovingShape> shapes;      // the arraylist to store all shapes
    private int currentShapeType, // the current shape type
        currentPath,                // the current path type
        currentWidth = 20,          // the current width of a shape
        currentHeight = 20;         // the current height of a shape

    private int delay = 30;         // the current animation speed
    JPopupMenu popup;               // popup menu

     /** Constructor of the AnimationPanel
        */
     public AnimationPanel() {
        shapes = new ArrayList<MovingShape>(); //create the vector to store shapes
        popup = new JPopupMenu(); //create the popup menu
        makePopupMenu();

        // add the mouse event to handle popup menu and create new shape
        addMouseListener( new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                maybeShowPopup(e);
            }

            public void mouseReleased(MouseEvent e) {
                maybeShowPopup(e);
            }

            private void maybeShowPopup(MouseEvent e) {
                if (e.isPopupTrigger()) {
                    popup.show(e.getComponent(), e.getX(), e.getY());
                }
            }
            public void mouseClicked( MouseEvent e ) {
                if (animationThread != null) {  // if the animation has started, then
                    boolean found = false;
                    MovingShape currentShape = null;
                    for (int i = 0; i < shapes.size(); i++) {
                        currentShape = shapes.get(i);
                        if ( currentShape.contains( e.getPoint()) ) { // if the mousepoint is within a shape, then set the shape to be selected/deselected
                            found = true;
                            currentShape.setSelected( ! currentShape.isSelected() );
                            System.out.println(currentShape);
                        }
                    }
                    if (! found) createNewShape(e.getX(), e.getY()); // if the mousepoint is not within a shape, then create a new one according to the mouse position
                }
            }
        });
    }

    /** create a new shape
     * @param x     the x-coordinate of the mouse position
     * @param y the y-coordinate of the mouse position
     */
    protected void createNewShape(int x, int y) {
        // get the margin of the frame
        Insets insets = getInsets();
        int marginWidth = getWidth() - insets.left - insets.right;
        int marginHeight = getHeight() - insets.top - insets.bottom;
        // create a new shape dependent on all current properties and the mouse position
        switch (currentShapeType) {
            case 0: { //rectnage
                shapes.add( new MovingRectangle(x, y, currentWidth, currentHeight, marginWidth, marginHeight, currentPath));
                break;
            }
        }
    }

    /** set the current shape type
     * @param s the new shape type
     */
    public void setCurrentShapeType(int s) {
        currentShapeType = s;
    }

    /** set the current path type and the path type for all currently selected shapes
     * @param t the new path type
     */
    public void setCurrentPathType(int t) {
        currentPath = t;
        MovingShape currentShape = null;
        for (int i = 0; i < shapes.size(); i++) {
            currentShape = shapes.get(i);
            if ( currentShape.isSelected()) {
                currentShape.setPath(currentPath);
            }
        }
    }

    /** set the current width and the width for all currently selected shapes
     * @param w the new width value
     */
    public void setCurrentWidth(int w) {
        MovingShape currentShape = null;
        currentWidth = w;
        for (int i = 0; i < shapes.size(); i++) {
            currentShape = shapes.get(i);
            if ( currentShape.isSelected()) {
                currentShape.setWidth(currentWidth);
            }
        }
    }

    /** set the current height and the height for all currently selected shapes
     * @param h the new height value
     */
    public void setCurrentHeight(int h) {
        MovingShape currentShape = null;
        currentHeight = h;
        for (int i = 0; i < shapes.size(); i++) {
            currentShape = shapes.get(i);
            if ( currentShape.isSelected()) {
                currentShape.setHeight(currentHeight);
            }
        }
    }

    /** remove all shapes from our vector
     */
    public void clearAllShapes() {
        shapes.clear();
    }

    // you don't need to make any changes after this line ______________

    /** create the popup menu for our animation program
     */
    protected void makePopupMenu() {
        JMenuItem menuItem;
     // clear all
        menuItem = new JMenuItem("Clear All");
        menuItem.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                clearAllShapes();
            }
        });
        popup.add(menuItem);
     }

    /** reset the margin size of all shapes from our vector
     */
    public void resetMarginSize() {
        Insets insets = getInsets();
        int marginWidth = getWidth() - insets.left - insets.right;
        int marginHeight = getHeight() - insets.top - insets.bottom ;
         for (int i = 0; i < shapes.size(); i++)
            ( shapes.get(i)).setMarginSize(marginWidth, marginHeight);
    }

    /** update the painting area
     * @param g the graphics control
     */
    public void update(Graphics g){
        paint(g);
    }

    /** move and paint all shapes within the animation area
     * @param g the Graphics control
     */
    public void paintComponent(Graphics g) {
        MovingShape currentShape;
        for (int i = 0; i < shapes.size(); i++) {
            currentShape =  shapes.get(i);
            currentShape.move();
            currentShape.draw(g);
        }
    }

    /** change the speed of the animation
     * @param newValue  the speed of the animation in ms
     */
    public void adjustSpeed(int newValue) {
        if (animationThread != null) {
            stop();
            delay = newValue;
            start();
        }
    }

    /** When the "start" button is pressed, start the thread
     */
    public void start() {
        animationThread = new Thread(this);
        animationThread.start();
    }

    /** When the "stop" button is pressed, stop the thread
     */
    public void stop() {
        if (animationThread != null) {
            animationThread = null;
        }
    }

    /** run the animation
     */
    public void run() {
        Thread myThread = Thread.currentThread();
        while(animationThread==myThread) {
            repaint();
            pause(delay);
        }
    }

    /** Sleep for the specified amount of time
     */
    private void pause(int milliseconds) {
        try {
            Thread.sleep((long)milliseconds);
        } catch(InterruptedException ie) {}
    }
}

Here's the MovingShape Class:

/*
 *  ===============================================================================
 *  MovingShape.java : The superclass of all shapes.
 *  A shape has a point (top-left corner).
 *  A shape defines various properties, including selected, colour, width and height.
 *  ===============================================================================
 */

import java.awt.*;
public abstract class MovingShape {

    public int marginWidth, marginHeight; // the margin of the animation panel area
    protected Point p;                  // the top left coner of shapes
    protected int width;            // the width of shapes
    protected int height;           // the height of shapes
    protected MovingPath path;          // the moving path of shapes
    protected boolean selected = false; // draw handles if selected

    /** constuctor to create a shape with default values
     */
    public MovingShape() {
        this(0, 0, 20, 20, 500, 500, 0); // the default properties
    }

    /** constuctor to create a shape
     * @param x         the x-coordinate of the new shape
     * @param y     the y-coordinate of the new shape
     * @param w         the width of the new shape
     * @param h         the height of the new shape
     * @param mw        the margin width of the animation panel
     * @param mh        the margin height of the animation panel
     * @param typeOfPath        the path of the new shape
     */
    public MovingShape(int x, int y, int w, int h, int mw, int mh, int pathType) {
        p = new Point(x,y);
        marginWidth = mw;
        marginHeight = mh;
        width = w;
        height = h;
        setPath (pathType);
    }

    /** Return the x-coordinate of the shape.
     * @return the x coordinate
     */
    public int getX() { return p.x; }

    /** Return the y-coordinate of the shape.
     * @return the y coordinate
     */
    public int getY() { return p.y;}

    /** Return the selected property of the shape.
     * @return the selected property
     */
    public boolean isSelected() { return selected; }

    /** Set the selected property of the shape.
     *  When the shape is selected, its handles are shown.
     * @param s     the selected value
     */
    public void setSelected(boolean s) { selected = s; }

    /** Set the width of the shape.
     * @param w     the width value
     */
    public void setWidth(int w) { width = w; }

    /** Set the height of the shape.
     * @param h     the height value
     */
    public void setHeight(int h) { height = h; }

    /**
     * Return a string representation of the shape, containing
     * the String representation of each element.
     */
    public String toString() {
        return "[" + this.getClass().getName() + "," + p.x + "," + p.y + "]";
    }

    /** Draw the handles of the shape
     * @param g     the Graphics control
     */
    public void drawHandles(Graphics g) {
        // if the shape is selected, then draw the handles
        if (isSelected()) {
            g.setColor(Color.black);
            g.fillRect(p.x -2, p.y-2, 4, 4);
            g.fillRect(p.x + width -2, p.y + height -2, 4, 4);
            g.fillRect(p.x -2, p.y + height -2, 4, 4);
            g.fillRect(p.x + width -2, p.y-2, 4, 4);
        }
    }

    /** Reset the margin for the shape
     * @param w     the margin width
     * @param h     the margin height
     */
    public void setMarginSize(int w, int h) {
        marginWidth = w;
        marginHeight = h;
    }

    /** abstract contains method
     * Returns whether the point p is inside the shape or not.
     * @param p the mouse point
     */
    public abstract boolean contains(Point p);

    /** abstract draw method
     * draw the shape
     * @param g     the Graphics control
     */
    public abstract void draw(Graphics g);

    /** Set the path of the shape.
     * @param pathID    the integer value of the path
     *  MovingPath.BOUNDARY is the boundary path
     *  MovingPath.FALLING is the falling path
     */
    public void setPath(int pathID) {
        switch (pathID) {
            case MovingPath.BOUNDARY : {
                path = new BoundaryPath(10, 10);
                break;
            }
            case MovingPath.FALLING : {
                path = new FallingPath();
                break;
            }
        }
    }

    /** move the shape by the path
     */
    public void move() {
        path.move();
    }

    // Inner class ===================================================================== Inner class

    /*
     *  ===============================================================================
     *  MovingPath : The superclass of all paths. It is an inner class.
     *  A path can change the current position of the shape.
     *  ===============================================================================
     */

    public abstract class MovingPath {
        public static final int BOUNDARY = 0; // The Id of the moving path
        public static final int FALLING = 1; // The Id of the moving path
        protected int deltaX, deltaY; // moving distance

        /** constructor
         */
        public MovingPath() { }

        /** abstract move method
        * move the shape according to the path
        */
        public abstract void move();
    }

    /*
     *  ===============================================================================
     *  FallingPath : A falling path.
     *  ===============================================================================
     */
    public class FallingPath extends MovingPath {
        private double am = 0, stx =0, sinDeltax = 0;

        /** constructor to initialise values for a falling path
         */
        public FallingPath() {
            am = Math.random() * 20; //set amplitude variables
            stx = 0.5; //set step variables
            deltaY = 5;
            sinDeltax = 0;
        }

        /** move the shape
         */
        public void move() {
            sinDeltax = sinDeltax + stx;
            p.x = (int) Math.round(p.x + am * Math.sin(sinDeltax));
            p.y = p.y + deltaY;
            if (p.y > marginHeight) // if it reaches the bottom of the frame, start again from the top
                p.y = 0;
            }
    }

    /*
     *  ===============================================================================
     *  BoundaryPath : A boundary path which moves the shape around the boundary of the frame
     *  ===============================================================================
     */
    public class BoundaryPath extends MovingPath {
        private int direction;

        /** constructor to initialise values for a boundary path
         */
        public BoundaryPath(int speedx, int speedy) {
            deltaX = (int) (Math.random() * speedx) + 1;
            deltaY = (int) (Math.random() * speedy) + 1;
            direction = 0;
        }

        /** move the shape
         */
        public void move() {
            int h = marginHeight - height;
            int w = marginWidth - width;
            switch  (direction) {
                case 0 : { // move downwards
                    p.y += deltaY;
                    if (p.y > h) {
                        p.y = h - 1;
                        direction = 90;
                    }
                    break;
                }
                case 90 : { // move to the right
                    p.x += deltaX;
                    if (p.x > w) {
                        p.x = w - 1;
                        direction = 180;
                    }
                    break;
                }
                case 180 : {
                    p.y -= deltaY; // move upwards
                    if (p.y < 0) {
                        direction = 270;
                        p.y = 0;
                    }
                    break;
                }
                case 270 : { // move to the left
                     p.x -= deltaX;
                     if (p.x < 0) {
                            direction = 0;
                            p.x = 0;
                     }
                     break;
                }
            }
        }
    }
 // ========================================================================================
}

and finally here's the moving rectangle class:

/*
 *  ===============================================================================
 *  MovingRectangle.java : A shape that is a rectangle.
 *  A rectangle has 4 handles shown when it is selected (by clicking on it).
 *  ===============================================================================
 */
import java.awt.*;
public class MovingRectangle extends MovingShape {

    /** constuctor to create a rectangle with default values
     */
    public MovingRectangle() {
        super();
    }

    /** constuctor to create a rectangle shape
     */
    public MovingRectangle(int x, int y, int w, int h,  int mw, int mh, int pathType) {
        super(x ,y ,w, h ,mw ,mh ,pathType);
    }

    /** draw the rectangle with the fill colour
     *  If it is selected, draw the handles
     *  @param g    the Graphics control
     */
    public void draw(Graphics g) {
        g.setColor(Color.blue);
        g.fillRect(p.x, p.y, width, height);
        g.setColor(Color.black);
        g.drawRect(p.x, p.y, width, height);
        drawHandles(g);
    }

    /** Returns whether the point is in the rectangle or not
     * @return true if and only if the point is in the rectangle, false otherwise.
     */
    public boolean contains(Point mousePt) {
        return (p.x <= mousePt.x && mousePt.x <= (p.x + width + 1)  &&  p.y <= mousePt.y && mousePt.y <= (p.y + height + 1));
    }
}
View Answers









Related Tutorials/Questions & Answers:
Java Shapes Bouncing App
Java Shapes Bouncing App  hi guys, im trying to implement the following into my java app code: Here's my code: first ill post the main class... JApplet and contains a panel where * shapes move around on the screen. Also
Java Bouncing Application
Java Bouncing Application  Hi I'm using Eclipse ide to add more implementation to this simple bouncing program. I'm having trouble implementing... to create new shapes -Sorting function in array list The code is too large
Advertisements
java program of different shapes
java program of different shapes  pls help me to get the code of a java program of different shapes using menu
Write a Java applet to draw cylinder and pentagon shapes.
Write a Java applet to draw cylinder and pentagon shapes.  Write a Java applet to draw cylinder and pentagon shapes
shapes - Java Beginners
shapes  helo guys its me again i do really appreciate you help.thank you so much. can you give me a java code same as usual I input a character and it will display a square and triangle sample: Enter a character
Finding shapes in digital photos - java
Finding shapes in digital photos - java  Hello, I need some hints/tips regarding some project I'm doing. The project is about finding shapes... this information to separate the main different coloured shapes in the photo
display shapes
display shapes  Hi, I would like to see geometric shapes like square, triangle, circle, rectangle as my outputs. Also, those figures shouldn't overlap while they get displayed. Please help me
shapes
Java - Drawing Shapes Example using color in java
Java - Drawing Shapes Example using color in java  ... will show you how to draw the different types of colorful shapes. This example show the different types of colorful shapes like line, circle and the rectangle. It also
ModuleNotFoundError: No module named 'shapes'
ModuleNotFoundError: No module named 'shapes'  Hi, My Python... 'shapes' How to remove the ModuleNotFoundError: No module named 'shapes'... to install padas library. You can install shapes python with following command
java app
java app  create an applet to display the Fibonacci numbers   1)AppletExample.java: import java.awt.*; import java.applet.*; import java.awt.event.*; public class AppletExample extends Applet implements ActionListener
drawing shapes in applet - Applet
drawing shapes in applet  hi, i need a single applet prgm which draws cone,cube and square in circle.  Hi manju, This is cube example.... http://www.roseindia.net/java
ModuleNotFoundError: No module named 'django-shapes'
ModuleNotFoundError: No module named 'django-shapes'  Hi, My... 'django-shapes' How to remove the ModuleNotFoundError: No module named 'django-shapes' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-shapes'
ModuleNotFoundError: No module named 'django-shapes'  Hi, My... 'django-shapes' How to remove the ModuleNotFoundError: No module named 'django-shapes' error? Thanks   Hi, In your python
Client Server Java app
Client Server Java app  I developed a client server based java networking Instant Messaging app. The client program is needed to be run on the client... heroku techniques for java but its hard for me to understand
How to design a bouncing cricket ball, design a bouncing cricket ball, cricket ball
How to design a bouncing cricket ball       Now you can bounce a cricket ball by using... have to adjust all the layers as a beautiful animation of bouncing ball
ModuleNotFoundError: No module named 'adafruit-circuitpython-display-shapes'
ModuleNotFoundError: No module named 'adafruit-circuitpython-display-shapes...: ModuleNotFoundError: No module named 'adafruit-circuitpython-display-shapes' How...-shapes' error? Thanks   Hi, In your python environment you
Maven Repository/Dependency: io.circe | circe-shapes
Maven Repository/Dependency of Group ID io.circe and Artifact ID circe-shapes. Latest version of io.circe:circe-shapes dependencies. # Version Release Date You can read more at: Maven
Creating Shapes using Shape Groups
Creating Shapes using Shape Groups In this section, you will learn how to create shapes using Apache POI library. EXAMPLE import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import
Drawing with Color in Java
how to draw colorful shapes in java swing. There are various colorful shapes...Drawing with Color in Java       ... of methods to draw shapes and fill these with the appropriate color. In this tutorial
Java App - Add, Delete, Reorder elements of the buttons
Java App - Add, Delete, Reorder elements of the buttons  Hello, I'm developing a Java application. I created this interface with MockupScreens. Please look at these pictures. At first time, there's only one element
Maven dependency for com.factati - app version 2.17 is released. Learn to use app version 2.17 in Maven based Java projects
; com.factati - app version 2.17 in Java projects. Follow the step by step tutorial... and includes  com.factati - app version 2.17 java library in your project. ADS...Maven dependency for  com.factati  - Version 2.17 of app released
Bouncing Thread Example
Bouncing Thread Example       In this section, we are going to develop a small Java Graphics... starts bouncing. On pushing 'Stop', ActionListener is called and the frame will get
Bouncing Thread Example
Bouncing Thread Example       In this section, we are going to develop a small Java Graphics... starts bouncing. On pushing 'Stop', ActionListener is called and the frame will get
Help needed on java standalone app and default browser interaction.
Help needed on java standalone app and default browser interaction.  Hi Developers and tutors, Is anyone able to guide on how am i able to extract the url thats displaying on my default browser to my java standalone application
How can I open my Java desktop app by clicking on its file?
How can I open my Java desktop app by clicking on its file?  How can I open my Java desktop app by clicking on the file it creates? This app creates... for this app. For instance, imagine I create an editor app called BlueSky
how to establish connection b/w java app and mobile phone
how to establish connection b/w java app and mobile phone  hello... to send SMS from our phone to a java application situated on a remote server... i.e.., we don't know how to send and receive SMS to java server.We don't know what
Maven dependency for io.github.devlibx.easy - dropwizard-app version 2.java-17.1 is released. Learn to use dropwizard-app version 2.java-17.1 in Maven based Java projects
( io.github.devlibx.easy - dropwizard-app version 2.java-17.1 ) in their Java project if it is based... - dropwizard-app version 2.java-17.1 in Java projects. Follow the step by step... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 1.java-17.1 is released. Learn to use dropwizard-app version 1.java-17.1 in Maven based Java projects
( io.github.devlibx.easy - dropwizard-app version 1.java-17.1 ) in their Java project if it is based... - dropwizard-app version 1.java-17.1 in Java projects. Follow the step by step... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.133 is released. Learn to use dropwizard-app version 0.0.133 in Maven based Java projects
- dropwizard-app version 0.0.133 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.133 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.132 is released. Learn to use dropwizard-app version 0.0.132 in Maven based Java projects
- dropwizard-app version 0.0.132 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.132 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.131 is released. Learn to use dropwizard-app version 0.0.131 in Maven based Java projects
- dropwizard-app version 0.0.131 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.131 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.130 is released. Learn to use dropwizard-app version 0.0.130 in Maven based Java projects
- dropwizard-app version 0.0.130 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.130 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.129 is released. Learn to use dropwizard-app version 0.0.129 in Maven based Java projects
- dropwizard-app version 0.0.129 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.129 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.128 is released. Learn to use dropwizard-app version 0.0.128 in Maven based Java projects
- dropwizard-app version 0.0.128 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.128 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.127 is released. Learn to use dropwizard-app version 0.0.127 in Maven based Java projects
- dropwizard-app version 0.0.127 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.127 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.126 is released. Learn to use dropwizard-app version 0.0.126 in Maven based Java projects
- dropwizard-app version 0.0.126 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.126 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.125 is released. Learn to use dropwizard-app version 0.0.125 in Maven based Java projects
- dropwizard-app version 0.0.125 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.125 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.124 is released. Learn to use dropwizard-app version 0.0.124 in Maven based Java projects
- dropwizard-app version 0.0.124 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.124 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.123 is released. Learn to use dropwizard-app version 0.0.123 in Maven based Java projects
- dropwizard-app version 0.0.123 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.123 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.122 is released. Learn to use dropwizard-app version 0.0.122 in Maven based Java projects
- dropwizard-app version 0.0.122 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.122 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.121 is released. Learn to use dropwizard-app version 0.0.121 in Maven based Java projects
- dropwizard-app version 0.0.121 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.121 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.120 is released. Learn to use dropwizard-app version 0.0.120 in Maven based Java projects
- dropwizard-app version 0.0.120 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.120 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.119 is released. Learn to use dropwizard-app version 0.0.119 in Maven based Java projects
- dropwizard-app version 0.0.119 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.119 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.118 is released. Learn to use dropwizard-app version 0.0.118 in Maven based Java projects
- dropwizard-app version 0.0.118 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.118 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.117 is released. Learn to use dropwizard-app version 0.0.117 in Maven based Java projects
- dropwizard-app version 0.0.117 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.117 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.116 is released. Learn to use dropwizard-app version 0.0.116 in Maven based Java projects
- dropwizard-app version 0.0.116 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.116 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.115 is released. Learn to use dropwizard-app version 0.0.115 in Maven based Java projects
- dropwizard-app version 0.0.115 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.115 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.114 is released. Learn to use dropwizard-app version 0.0.114 in Maven based Java projects
- dropwizard-app version 0.0.114 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.114 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy
Maven dependency for io.github.devlibx.easy - dropwizard-app version 0.0.113 is released. Learn to use dropwizard-app version 0.0.113 in Maven based Java projects
- dropwizard-app version 0.0.113 ) in their Java project if it is based on Maven...; io.github.devlibx.easy - dropwizard-app version 0.0.113 java library in your... of dropwizard-app released The developers of   io.github.devlibx.easy

Ads