GeneralPath « Graphics « Java Swing Q&A





1. Drawing a GeneralPath using a dashed stroke    coderanch.com

Hi all, I have recently started to support dashed strokes in my application and found that dashed strokes are not well suited for drawing GeneralPaths. The unstroked segments are too small, and at one point they disappear, making the dashed GeneralPath look like a solid GeneralPath. Here is some sample code to play: import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class ...

2. Use GeneralPath class to draw octagon    java-forums.org