Aggiunti esercizi P7.17 e 18
Aggiunti esercizi P7.17 e 18 (Cloud e Polygon), grafica
This commit is contained in:
24
7.x/P7.18 Polygon/PolygonViewer.java
Normal file
24
7.x/P7.18 Polygon/PolygonViewer.java
Normal file
@@ -0,0 +1,24 @@
|
||||
import javax.swing.JFrame;
|
||||
|
||||
/**
|
||||
Classe che visualizza una lampadina tramite un JFrame e LampadinaComponent
|
||||
@author radaelli11353
|
||||
*/
|
||||
public class PolygonViewer {
|
||||
/**
|
||||
Metodo main di LampadinaViewer
|
||||
@param args Argomenti passati all'esecuzione del programma
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
JFrame frame = new JFrame();
|
||||
|
||||
frame.setSize(500, 500);
|
||||
frame.setTitle("Visualizzatore poligono");
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
PolygonComponent component = new PolygonComponent();
|
||||
frame.add(component);
|
||||
|
||||
frame.setVisible(true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user