1. Custom widget shapes in SWT stackoverflow.comI'm trying to work out how to make SWT widgets (e.g. Label, Frame) be some shape other than rectangular. I've made a custom shaped main window using the setRegion() method. Now I ... |
2. AffineTransform: scaling a Shape from its center stackoverflow.comI'm trying to scale a rectangle from its center using AffineTransform. I'm sure the solution is obvious but I cannot make it work ! Here is what I've tested so far...
|
3. rotate shape java2d without losing its origin stackoverflow.com
|
4. Creating a Squircle stackoverflow.comI'm a first year programmer. I'm trying to create a squircle. (square with round corners). So far i have managed to get. I have been given the constants of a,b and ... |
5. java/swing: converting a text string to a Shape stackoverflow.comI want to convert some arbitrary text to a Shape ( |
6. java/swing: Shape questions: serializing and combining stackoverflow.comI have two questions about
|
7. Java Swing custom shapes (2D Graphics) stackoverflow.comI need to draw custom shapes. Now when a user clicks on several points on the panel I create a shape using a polygon.
|
8. How to draw 'biohazard' with swing stackoverflow.comI'm practicing my swing abilities for the upcoming test, and fried gave me idea to draw biohazard sign like this : I could draw the circles with Elipse2D, but ... |
9. Drawing star shapes with variable parameters stackoverflow.comI have task to write program allowing users to draw stars, which can differ in size and amount of arms. When I was dealing with basic stars I was doing it ... |
10. Guidelines to implement a minimal shape drawing tool desktop application using Java stackoverflow.comWe need to implement a Java desktop application that allows us (initially) to create / edit / resize / polygons on (initially) images. Then these polygons would be mapped to objects ... |
11. Java awt/swing AffineTransformation to move around shapes stackoverflow.comA program that animates circles is not drawing them fluidly once several hundred are drawn at once. It was suggested to use affine transformation to copy the shapes. This code, refactored ... |
12. How do I draw various shapes in Java ? Which library should I use? stackoverflow.comI want to write a program which can draw any type of shape that I assign to it like
|
13. Changing squares to rectangles in simple a Swing program stackoverflow.comI'm having some issues with what is probably a very simple problem in Java. I have written the following program that displays a 10x10 color matrix of squares whose colors are ... |
14. Java: line-stroke with filled shape stackoverflow.comThis is not really important, but it was bothering me for a little while.
Problem description: |
15. Eclipse GEF Shapes Look and Feel stackoverflow.comI am creating a gef editor for bpmn2 notations. I am able to create figures in editors, but i am lacking in look and feel of the shapes but i tried ... |
16. High level API for creating 2D Shapes in Java stackoverflow.comI am seeking an API or program which I can use to create Shapes graphically in Java (specifically closed shapes). A tool simalar to paint in windows, but without ... |
17. How to create a custom Java Swing GUI Component with a shape and gradient stackoverflow.comI have to create a custom component on my JFrame, the Component will show the storage status of that user, the storage will be in percentage. I need to create something like ... |
18. Drawing Arbitrarily Sided Shape stackoverflow.comI'm writing a drawing program and one feature I would like to implement is arbitrarily sided shapes. I have most of the features worked out, but one thing I need ... |
19. Draw a Shape within paint method stackoverflow.comMy program is a method to draw a circle on |
20. creating a String Shape of specified size coderanch.com |
21. Easy rotation of simple shapes coderanch.com |
22. How to create a node like a basic shape in visio diagram? coderanch.com |
23. Fill a shape based on a General Path coderanch.comI have an applet that has an inner class that extends JComponent. This inner class has a paint method that draws a number of Stars. The Star class is defined as a separate class that implements Shape in the same package. A Star is made from a GeneralPath. This all works fine. My problem is that I don't know how to ... |
24. how to paint some shape over another JComponent coderanch.comimport java.awt.*; import java.awt.event.*; import javax.swing.*; public class Test { public static void main(String[] args) { JFrame f = new JFrame(); f.setContentPane(new ContentPanel()); f.setSize(400, 400); f.setVisible(true); } } class ContentPanel extends JPanel implements MouseListener { int x; // hold the click point position int y; // hold the click point position JLabel imageLabel; public ContentPanel() { imageLabel = new JLabel(); imageLabel.setIcon(new ... |
25. How do I scale a shape? coderanch.comI'm drawing shapes on top of an image using a subclass of JLabel. The problem is the image can be scaled (zoomed) in or out and I need each Shape to be scaled to be larger or smaller with the image. This is pretty easy with something simple like a Rectangle, just multiply the width, height, x and y values by ... |
26. draw shapes on video and photos in java coderanch.comnot sure if this is the right forum but I would like to learn how to write a java swing program(not applet) that can open video files to be played. the main thing i also want to do is be able to draw shapes on top of the video like lines, ovals, rectangles etc. does anyone know how i would get ... |
27. Increasing or decreasing shape size in a drawing tool coderanch.com |
28. Shape.getPathIterator() called w/ null AffineTransform coderanch.comHi. I posted this to the 'other APIs' group a few days ago (because it listed Java2D) and didn't garner any responses, so I thought i would try in the GUI forum. Hello. I've written an object that implements Shape. This object has some crazy coordinates that it uses internally that must be mapped to the screen using a transformation. Consider ... |
29. Wanted: How to use Strategy Pattern with Shapes? coderanch.comI have three questions (1) How do I refactor Craig's code to use Strategy pattern so I can do for(Myshape shape : Shapes) shape.draw(g2); (2) How do I create a class called TextShape so I can use the above loop with shapes that contain text strings. Craig used "g2.draw(at.createTransformedShape(shapes[0]));" and I cannot figure out how to refactor this. When I pass ... |
30. Serializable and Shapes coderanch.comHi, I have a interface called FCShape which I have said extends Serializable. I then have various classes that extend JComponent and implement FCShape. Instances of these classes are then stored in a vector. The problem is that I would like to save this vector to a file using writeObject. This works for other objects but will not work for this ... |
31. Extending the Shape class coderanch.comHi Guys, Is there anyway of extending the Shape class. I want to draw a circle with a sqiggle in it - to represent a generator. I need to implement this as a Shape as I want to be able to affine transform it with code similar to the one below. Shape transformedCircle = new Path2D.Double(circle0, atf); In this case I ... |
32. Can move shapes individually but not as a group coderanch.comHi Guys, Hopefully as Mr Churchill said "This is the end of the beginning". This code is supposed to drag both shapes individually and shapes as a group. The boolean dragging works fine as a signal to move the shapes individually. The boolean draggingScreen DOES NOT work for dragging all the object. This should happen when a shape is not clicked. ... |
33. Problems moving shapes when set up own Shapes class extending Path2D.Double coderanch.comAuthor Problems moving shapes when set up own Shapes class extending Path2D.Double Kieran Murray Ranch Hand Joined: May 18, 2008 Posts: 47 posted Jul 29, 2008 08:21:00 0 Dear Guys, Thank you for your help already. I have now used your previous code and enlarged it so that I can use my own shapes rather than the ones provided. I need ... |
34. Overlapping Shapes coderanch.comSo I've got this problem where I have shape (say a pie-shaped arc) and another shape (say an ellipse), and I want to find out if they overlap. However, not only so I need to find out if they overlap, I need to see if the area that the overlap occurs is more than a third shape (say another pie-shaped arc) ... |
35. repainting in shapes other than square coderanch.comWhat I want to do is to repaint a square component but only a portion of it say in a circular shape. Something like.... repaint(10,10,new Circle()) ... I think that gets the point across. I do not want to repaint the entire component just some portion of it in a shape other than repaint(0,0,getWidth(),getHeight()) type of deal. Thanks in advance, Christopher ... |
36. drawing 3d shapes? coderanch.com |
37. class who implement shape, paint, draw coderanch.com |
38. Information about moving shapes coderanch.comHello, I have a project in which I feel it would be useful to have some form of animation. Not something too complicated, but a stick figure maybe made up of lines and a circle . I have data that I will be reading from files, and was hoping to be able to use this data to make the stick figure ... |
39. previously drawn shapes disappear when new one is created coderanch.comI'm trying to make an application that allows the user to draw shapes. It works apart from the fact that when I draw a new shape, the previous one I drew disappears. I want to allow the user to draw as many shapes as they want... Below I am posting code of two classes, MapTab class which contains the DrawingCanvas class ... |
40. Shapes return 0's as coordinates, width & height coderanch.comHi, the code below is supposed to allow me to draw mutliple shapes. Currently I'm trying to implement selecting shapes by clicking on them (to be able to drag them to a different location). In the mouseClicked() method, I check whether the user just clicked inside a shape. However, it never returns true. In the mouseExited() method I print width, height ... |
41. How to bring a shape to front/back? coderanch.comI am looking for a way of determining the order of shapes to be able to move them to in front of/behind other shapes. I did a search and I couldn't find anything useful. I remember that some time ago I saw something about z-value (?) that related to the layering order... |
42. Java AWT Intersect Function regarding encapsulated shapes. coderanch.comI have been running some tests with the java.awt.geom API and i have a question about the Shape Class and i need to work with specifically the Area implementation. I create 2 shapes, both Path2D types, then convert both to an Area. One shape in completely inside the other. When i do an intersect between the two i get some peculiar ... |
43. awt.Shape intersect between different shapes coderanch.comHello, I am trying to make a game for school. In this game I simulate collision by using the .collision function of the awt.Shape 's I am using. Now I am adding an object that is not a rectangle and I see that you can not use intersect for a comparison between different shapes. Is there any build in way to ... |
44. Zoom in shape object coderanch.com |
45. Creating a circle shape java swing coderanch.com |
46. Help with Move Shape java-forums.orgI have been able to create simple forms that can accept and store user entered data, as well as perform multiple actions through the use of buttons. No Problem. Next I would like to work with drawing shapes and giving the user the ability to interact with them. This is where Ive hit a wall. This is probably very simple just ... |
47. how to select Shape object after rotation. java-forums.orgHi aLL, I have a problem while selecting a Shape Object after rotation has made to that when mouse clicked on that object. I am able to select a shape(Rectangle) Object without rotation(0 Degrees) using contains method in the Shape Object. Pls help me... how to select the Shape Object. Thanks in Advance. |
48. Rotated Shape Object Line weight is not retaining properly in printing java-forums.orgHi All, I have two rectangle objects one has rotated with 45 degrees another one is without rotation both are have double line thickness. while printing ,the one which is not rotated is printing correctly and another one(rotated shape) is printing thin lines. Pls suggest me to overcome this issue. Thanks in Adance. |
49. Help, basic shapes using java java-forums.org |
50. How to fix this code to move this shape? java-forums.orgHi guys Below code can draw a polygon whenever the mouse is pressed, but it is also supposed to drag the polygon to move to anywhere the mouse is released. But the polygon doesn't move at all. Does anyone know how to fix it? I believe it must be something wrong in OctagonPanel class, please see my OctagonPanel class below: (public ... |
51. A Shape Class java-forums.orgI am relatively new to java and have recently taken an interest in 3D programming. The following is a class i wrote to create a shape in 3D space that can then be represented as a polygon in a java Applet. The problem is that the driver i wrote to create and display one of these shapes didn't work. I was ... |
52. Need help moving a shape! java-forums.orgHi, I'm a beginner and recently started to see some of JPanel and graphics. I want to make a small square of 10x10 px. move around the screen by pressing the arrows, one pixel for every time I press the arrow. But I can't! Instead of adding or subtracting one pixel in x or y, it adds or subtracts z pixels ... |
53. how can create movable and resizable shapes in java java-forums.orgI have written a program for my java project on. i have attached the code here. i have to use JPanel.. the program allows users to select some shapes from a box and the important things is that users can move this shapes and also can change the size of them with mouse..both of this action must do with mouse..i just ... |
54. Using GUI to select a shape object from and array java-forums.orgUsing GUI to select a shape object from and array Well I'm having a problem trying to access shapes from my arrayList (sample) i have to many different classes to post here but my code is like this for what I'm trying to work out. sample = arraylist of drawingShape DrawingShape = superclass of shapes i have (circle, rectangle ... |