ull); _life. setVisible (true);
} static void main (String [] args) {. swing. SwingUtilities. invokeLater (new Runnable () {void run () {life_frank ();
}}); }}
Файл museum_gallery. java:
package Main. Gallery; java. awt. GridLayout; javax. swing. ImageIcon; javax. swing. JButton; javax. swing. JFrame; javax. swing. JPanel; javax. swing. JScrollPane; javax. swing. SwingUtilities; Main. menu; class musuem_gallery {musuem_gallery () {frm_gallery=new JFrame («Галерея музею»); panel=new JPanel (); _gallery. setSize (1180,650); _gallery. setResizable (false);. setLayout (new GridLayout (2,13,10,50)); _gallery. setDefaultCloseOperation (JFrame. DISPOSE_ON_CLOSE); _gallery. add (panel);
/ / 1path1=«images/f_1.jpg »;. net. URL imgURL1=menu. class. getResource (path1); icon1=new ImageIcon (imgURL1); b1=new JButton ();. setIcon (icon1);. add (b1);// 26path26=«images/f_26.jpg »;. net. URL imgURL26=menu. class. getResource (path26); icon26=new ImageIcon (imgURL26); b26=new JButton ();. setIcon (icon26);. add (b26); scrollBar=new JScrollPane (panel, JScrollPane. VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane. HORIZONTAL_SCROLLBAR_ALWAYS); _gallery. add (scrollBar); _gallery. setLocationRelativeTo (null); _gallery. setVisible (true);
} static void main (String args []) {. invokeLater (new Runnable () {void run () {musuem_gallery ();
}}); }}