CubicCurve2D connecting two JInternalFrame instances

Yes. Here’s an example using drawLine(int x1, int y1, int x2, int y2), but invoking draw(Shape s) on your curve is a straightforward extension. You may have to expand the ComponentAdapter to handle resize events, too. import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Stroke; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import … Read more