Shape « JPanel « Java Swing Q&A





1. how add different shapes partially on JPanel+image which is on JPanel    stackoverflow.com

My Project is in Java Swing. I have a JPanel on which I am adding some images with .png extension (which are on JLabels) at center. Now I want to add a ...

2. Java - Custom Shape Panels?    stackoverflow.com

I am working on an application that involves the user requiring to hover over several moving dots on the screen in order to launch specific popups. At the moment, i am ...

3. in jpanel how to send a shape from server to client    stackoverflow.com

how to send some shape or drawing from server to client which is drawn in jpanel

4. Dragging shapes between JPanels    stackoverflow.com

I'm working on a domino game and it's going pretty well, now I want to drag a domino tile from one JPanel to another, my dragging implementation works, it's just that ...

5. erasing a shape in java    stackoverflow.com

i am trying to draw circles that appear every second, i was able to do so but how do i make the old shape disappear ?

 public void paint(Graphics g) {
 ...

6. Java Swing JPanel. How do I paint shapes?    stackoverflow.com

I have implemented a class DrawingPane extends JPanel to draw some shapes. I have created inside an individual method for each type of shape, for example to circles corresponds :

public void ...

7. Drawing multiple shapes onto a JPanel    stackoverflow.com

I apologise if this has any element of ambiguity, but I am kind of overwhelmed by the Java Swing/AWT libraries (I hate GUI programming!). Basically I have set up a very basic ...

8. How to draw shapes inside JPanel?    stackoverflow.com

Referring to my earlier question: Based on your valuable answers, I choose Java 2D library to cater my requirements. I completely read the above said library and have full understanding ...

9. Does Each Shape requre a new Panel?    java-forums.org

Hi, I've been trying to search the net on this topic and haven't had much luck. I am trying to draw a variety shapes each having different stroke sizes etc. The way I am doing it now doesn't seem to be very efficient. I am creating a new class that extends jPanel and then draw my shape under the paint method. ...





10. How do I get a shape to display in a JPanel?    forums.oracle.com

11. How do i draw a shape that changes when it is clicked on in a JPanel    forums.oracle.com

In the future Swing related questions should be posted in the Swing forum. There is no need to do custom painting. Add a JPanel using a LineBorder(...) to your main panel. Then add a MouseListener to the panel. When you click on the panel you change the background of the panel and remove the border. When you click a second time ...