예제 #1
0
 private void putPlanetImageToButton() {
   planetImageIcon = new ImageIcon(fileURL);
   planetImage = planetImageIcon.getImage().getScaledInstance(65, 65, java.awt.Image.SCALE_SMOOTH);
   imageButton[buttonIndex] =
       new JButton(planet.planetName().toUpperCase(), new ImageIcon(planetImage));
   imageButton[buttonIndex].addActionListener(
       PlanetActionListener.planetInformation(planet.toString())
           .andMultipleFramesContainer(multipleFramesContainer));
 }
예제 #2
0
 private void setURL() {
   fileURL = this.getClass().getResource("images/" + planet.planetName() + ".png");
 }