I am looking for a way to use 9-patch file as background for javax.swing.JPanel. So that the background image automatically changes when resizing JPanel.
Is it possible? Or do I need to create all parts of the image and manually resize some of them when the listener triggers (as in the following code fragment)?
public class JPanelWithNinePatchBackground extends JPanel { { addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) {
source share