Wondering if this is the best class for me to use? 1. Want a Jpg in background with JMenuBar on top 2. Want to draw lines on top of jpg pic. 3. Want ScrollPane to work cause the pic will be bigger than the size of the window.
posted 10 years ago
perhaps this way
the JMenubar is set via setJMenuBar
sub-class JPanel #1, giving it a preferredSize(), setting it as a BorderLayout, and in paintComponent() you draw the image.
another sub-classed JPanel #2, setOpaque(false), and in paintComponent() you draw your lines
add #2 to #1, add #1 to the scrollpane, add the scrollpane to the frame