Well if you’ve seen my “Res Folder” post not long ago, you’d see my cluttered up code:
// CloseButton
URL jfBG = PatchNotesGUI.class.getResource("/PatchFrame/patchBG.png");
URL bCD = PatchNotesGUI.class.getResource("/close/button_CLOSE.png");
URL bCCD = PatchNotesGUI.class
.getResource("/close/button_CLOSE_CLICK.png");
URL bCH = PatchNotesGUI.class
.getResource("/close/button_CLOSE_HOVER.png");
URL lCB = PatchNotesGUI.class
.getResource("/close/large//button_LARGE_CLOSE.png");
URL lCC = PatchNotesGUI.class
.getResource("/close/large//button_LARGE_CLOSE_CLICKED.png");
URL lCH = PatchNotesGUI.class
.getResource("/close/large//button_LARGE_CLOSE_HOVER.png");
is there a way I can make like ImageLoader.java, put all of these in it, then continue calling them in this class? like this:
JButton Close = new JButton();
Close.setIcon(new ImageIcon(bCD));
Close.setSelectedIcon(new ImageIcon(bCCD));
Close.setDisabledIcon(new ImageIcon(bCH));
Close.setDisabledSelectedIcon(new ImageIcon(bCH));
Close.setPressedIcon(new ImageIcon(bCCD));
Close.setRolloverIcon(new ImageIcon(bCH));
Close.setRolloverSelectedIcon(new ImageIcon(bCH));
is how I’ve been doing it. Any help would be nice, need to fancy it up and get rid of the clutter haha