About 69,100 results
Open links in new tab
  1. java - Constructing Rectangle - Stack Overflow

    I am constructing a Rectangle class. I tried many times and watched numerous tutorials, but my program is not working. This is my code so far: public class Rectangle { public static void main(

  2. How to create a Rectangle object in Java using g.fillRect method

    I need to create a rectangle object and then paint it to the applet using paint (). I tried Rectangle r = new Rectangle(arg,arg1,arg2,arg3); Then tried to paint it to the applet using g.draw(r); It …

  3. applet - How to move a rectangle in Java? - Stack Overflow

    Nov 20, 2011 · I am trying to move a rectangle but I am not sure how to do it, I know it something to do with 'mouseClicked(MouseEvent e)` but don't know how to use it. This is the code I have …

  4. java - Make Rectangle transparent - Stack Overflow

    Oct 7, 2014 · I need to make a drawn rectangle mouse transparent, in order to see the desktop. The following code draws my rectangle. What should I add to get that ? Thanks for help public …

  5. java - How do I make a rectangle move across the screen with key ...

    Dec 31, 2013 · The game I'm trying to create is snake and so far I've figured out how to use paint (Graphics g) a bit of JPanel, mouse listener and now I'm trying to create a rectangle that will …

  6. java - How to make a rectangle in Graphics in a transparent colour ...

    I'm trying to paint a rectangle on my application in a red shade but I need to make it sort of transparent so that the component under it will still show. However I still want that some colour …

  7. Creating a Hollow Rectangle Using Asterisks in Java

    Mar 12, 2015 · This is a homework assignment. However, I've completed almost all the code and am missing just one piece. The program is supposed to print out a rectangle according to user …

  8. java - Java2D: Increase the line width - Stack Overflow

    Oct 22, 2015 · I want to increase the Line2D width. I could not find any method to do that. Do I need to actually make a small rectangle for this purpose?

  9. drawing simple rectangles on a Jframe in java - Stack Overflow

    Mar 15, 2012 · The JFrame's contentPane uses BorderLayout by default. When you add a Square to it, it gets added by default BorderLayout.CENTER and covers up any previously added …

  10. Rotating the Rectangle object in java - Stack Overflow

    There's also another way to do this (besides createTransformedShape) which creates fewer temporary objects, if that's desirable. Instead of keeping a Rectangle2D for the bounding box, …

Refresh