Java2D: Increase the line width
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? You should use setStroke to set a stroke of the Graphics2D object. The example at http://www.java2s.com gives you some code examples. The following code produces the image below: import java.awt.*; import java.awt.geom.Line2D; import javax.swing.*; public class FrameTest { public static void main(String[] args) { JFrame jf = new JFrame("Demo"); Container cp = jf.getContentPane(); cp.add(new JComponent() { public void paintComponent(Graphics g) { Graphics2D