Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package zoogui;
- import java.awt.Color;
- import javax.swing.JApplet;
- /**
- *
- * @author kando1927
- */
- public class zoogui extends javax.swing.JFrame {
- /**
- * Creates new form zoogui
- */
- ClassLoader AssetLoader = this.getClass().getClassLoader();
- java.applet.AudioClip bearSound = JApplet.newAudioClip(AssetLoader.getResource("BeetovenBear.wav"));
- java.applet.AudioClip eurasianSound = JApplet.newAudioClip(AssetLoader.getResource("BachBear.wav"));
- java.applet.AudioClip slothSound = JApplet.newAudioClip(AssetLoader.getResource("SchubertBear.wav"));
- java.applet.AudioClip brownSound = JApplet.newAudioClip(AssetLoader.getResource("Brahm.wav"));
- java.applet.AudioClip monkeySound = JApplet.newAudioClip(AssetLoader.getResource("MonteverdiMonkey.wav"));
- java.applet.AudioClip patasSound = JApplet.newAudioClip(AssetLoader.getResource("PatasMonkey.wav"));
- java.applet.AudioClip tamarinSound = JApplet.newAudioClip(AssetLoader.getResource("TamarinMonkey.wav"));
- java.applet.AudioClip capuchinSound = JApplet.newAudioClip(AssetLoader.getResource("WhiteCapuchin.wav"));
- java.applet.AudioClip birdSound = JApplet.newAudioClip(AssetLoader.getResource("BrittenBird.wav"));
- java.applet.AudioClip frigateSound = JApplet.newAudioClip(AssetLoader.getResource("FaureFrigate.wav"));
- java.applet.AudioClip pigeonSound = JApplet.newAudioClip(AssetLoader.getResource("ProkofievPigeon.wav"));
- java.applet.AudioClip puffinSound = JApplet.newAudioClip(AssetLoader.getResource("PucciniPuffin.wav"));
- public zoogui() {
- initComponents();
- }
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- pnl_opener = new javax.swing.JPanel();
- jButton1 = new javax.swing.JButton();
- jLabel2 = new javax.swing.JLabel();
- jLabel1 = new javax.swing.JLabel();
- pnl_monkey = new javax.swing.JPanel();
- lbl_titleMonkey = new javax.swing.JLabel();
- lbl_info1Monkey = new javax.swing.JLabel();
- lbl_info2Monkey = new javax.swing.JLabel();
- lbl_imgMonkey = new javax.swing.JLabel();
- btn_patas = new javax.swing.JButton();
- btn_capuchin = new javax.swing.JButton();
- btn_tamarin = new javax.swing.JButton();
- lbl_info1BehaviorsMo = new javax.swing.JLabel();
- lbl_info2BehaviorsMo = new javax.swing.JLabel();
- lbl_info3BehaviorsMo = new javax.swing.JLabel();
- lbl_info1AttributesMo = new javax.swing.JLabel();
- lbl_info2AttributesMo = new javax.swing.JLabel();
- lbl_info3AttributesMo = new javax.swing.JLabel();
- pnl_bear = new javax.swing.JPanel();
- lbl_titleBear = new javax.swing.JLabel();
- lbl_imgBear = new javax.swing.JLabel();
- lbl_info2Bear = new javax.swing.JLabel();
- lbl_info1Bear = new javax.swing.JLabel();
- btn_sloth = new javax.swing.JButton();
- btn_eursasian = new javax.swing.JButton();
- btn_brown = new javax.swing.JButton();
- lbl_info1BehaviorsBe = new javax.swing.JLabel();
- lbl_info2BehaviorsBe = new javax.swing.JLabel();
- lbl_info3BehaviorsBe = new javax.swing.JLabel();
- lbl_info1AttributesBe = new javax.swing.JLabel();
- lbl_info2AttributesBe = new javax.swing.JLabel();
- lbl_info3AttributesBe = new javax.swing.JLabel();
- pnl_bird = new javax.swing.JPanel();
- lnl_titleBird = new javax.swing.JLabel();
- lbl_info1Bird = new javax.swing.JLabel();
- lbl_info2Bird = new javax.swing.JLabel();
- lbl_imgBird = new javax.swing.JLabel();
- btn_frigate = new javax.swing.JButton();
- btn_pigeon = new javax.swing.JButton();
- btn_puffin = new javax.swing.JButton();
- lbl_info1BehaviorsBi = new javax.swing.JLabel();
- lbl_info2BehaviorsBi = new javax.swing.JLabel();
- lbl_info3BehaviorsBi = new javax.swing.JLabel();
- lbl_info1AttributesBi = new javax.swing.JLabel();
- lbl_info2AttributesBi = new javax.swing.JLabel();
- lbl_info3AttributesBi = new javax.swing.JLabel();
- pnl_superClass = new javax.swing.JPanel();
- btn_monkey = new javax.swing.JButton();
- btn_bird = new javax.swing.JButton();
- btn_bear = new javax.swing.JButton();
- pnl_opener.setLayout(null);
- jButton1.setText("Start");
- pnl_opener.add(jButton1);
- jButton1.setBounds(260, 250, 130, 30);
- jLabel2.setFont(new java.awt.Font("Tw Cen MT Condensed", 1, 36)); // NOI18N
- jLabel2.setText(" The KMM Zoo");
- pnl_opener.add(jLabel2);
- jLabel2.setBounds(220, 100, 200, 80);
- jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/bg2.jpg"))); // NOI18N
- pnl_opener.add(jLabel1);
- jLabel1.setBounds(30, 0, 600, 460);
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- setPreferredSize(new java.awt.Dimension(730, 505));
- pnl_monkey.setBackground(new java.awt.Color(255, 255, 204));
- pnl_monkey.setVisible(false);
- lbl_titleMonkey.setFont(new java.awt.Font("Tw Cen MT Condensed", 1, 36)); // NOI18N
- lbl_titleMonkey.setText("Monkeys");
- lbl_info1Monkey.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
- lbl_info1Monkey.setText("Behaviors:");
- lbl_info2Monkey.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
- lbl_info2Monkey.setText("Attributes:");
- lbl_imgMonkey.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Claudio Giovanni Antonio Monkey.jpg"))); // NOI18N
- btn_patas.setText("Patas Monkey");
- btn_patas.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_patasActionPerformed(evt);
- }
- });
- btn_capuchin.setText("White-headed Capuchin");
- btn_capuchin.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_capuchinActionPerformed(evt);
- }
- });
- btn_tamarin.setText("Emperor Tamarin");
- btn_tamarin.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_tamarinActionPerformed(evt);
- }
- });
- lbl_info1BehaviorsMo.setText("- Omnivore");
- lbl_info2BehaviorsMo.setText("- Climbs trees");
- lbl_info3BehaviorsMo.setText("- Socialze with others");
- lbl_info1AttributesMo.setText("- Social");
- lbl_info2AttributesMo.setText("- Have tails");
- lbl_info3AttributesMo.setText("- Intellegent");
- javax.swing.GroupLayout pnl_monkeyLayout = new javax.swing.GroupLayout(pnl_monkey);
- pnl_monkey.setLayout(pnl_monkeyLayout);
- pnl_monkeyLayout.setHorizontalGroup(
- pnl_monkeyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_monkeyLayout.createSequentialGroup()
- .addGroup(pnl_monkeyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_monkeyLayout.createSequentialGroup()
- .addGap(35, 35, 35)
- .addComponent(lbl_imgMonkey)
- .addGap(18, 18, 18)
- .addGroup(pnl_monkeyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbl_info1Monkey)
- .addComponent(lbl_info1BehaviorsMo)
- .addComponent(lbl_info2BehaviorsMo)
- .addComponent(lbl_info3AttributesMo)
- .addComponent(lbl_info2Monkey)
- .addComponent(lbl_info3BehaviorsMo)
- .addComponent(lbl_info1AttributesMo)
- .addComponent(lbl_info2AttributesMo)))
- .addGroup(pnl_monkeyLayout.createSequentialGroup()
- .addGap(21, 21, 21)
- .addComponent(btn_patas)
- .addGap(36, 36, 36)
- .addComponent(btn_capuchin)
- .addGap(32, 32, 32)
- .addComponent(btn_tamarin))
- .addGroup(pnl_monkeyLayout.createSequentialGroup()
- .addGap(284, 284, 284)
- .addComponent(lbl_titleMonkey)))
- .addContainerGap(305, Short.MAX_VALUE))
- );
- pnl_monkeyLayout.setVerticalGroup(
- pnl_monkeyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_monkeyLayout.createSequentialGroup()
- .addGap(23, 23, 23)
- .addComponent(lbl_titleMonkey, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(pnl_monkeyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbl_imgMonkey)
- .addGroup(pnl_monkeyLayout.createSequentialGroup()
- .addComponent(lbl_info1Monkey)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info1BehaviorsMo)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info2BehaviorsMo)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info3BehaviorsMo)
- .addGap(29, 29, 29)
- .addComponent(lbl_info2Monkey)
- .addGap(7, 7, 7)
- .addComponent(lbl_info1AttributesMo)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info2AttributesMo)
- .addGap(8, 8, 8)
- .addComponent(lbl_info3AttributesMo)))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)
- .addGroup(pnl_monkeyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(btn_tamarin)
- .addComponent(btn_capuchin)
- .addComponent(btn_patas))
- .addGap(20, 20, 20))
- );
- pnl_bear.setBackground(new java.awt.Color(255, 255, 204));
- pnl_bear.setVisible(false);
- lbl_titleBear.setFont(new java.awt.Font("Tw Cen MT Condensed", 1, 36)); // NOI18N
- lbl_titleBear.setText("Bears");
- lbl_imgBear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Ludwig Van Bearthoven.jpg"))); // NOI18N
- lbl_info2Bear.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
- lbl_info2Bear.setText("Attributes:");
- lbl_info1Bear.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
- lbl_info1Bear.setText("Behaviors:");
- btn_sloth.setText("Sloth Bear");
- btn_sloth.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_slothActionPerformed(evt);
- }
- });
- btn_eursasian.setText("Eurasian Bear");
- btn_eursasian.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_eursasianActionPerformed(evt);
- }
- });
- btn_brown.setText("Brown Bear");
- btn_brown.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_brownActionPerformed(evt);
- }
- });
- lbl_info1BehaviorsBe.setText("- Hunt");
- lbl_info2BehaviorsBe.setText("- Compose music");
- lbl_info3BehaviorsBe.setText("- Hibernate");
- lbl_info1AttributesBe.setText("- Musically inclined");
- lbl_info2AttributesBe.setText("- Curious");
- lbl_info3AttributesBe.setText("- Has fur");
- javax.swing.GroupLayout pnl_bearLayout = new javax.swing.GroupLayout(pnl_bear);
- pnl_bear.setLayout(pnl_bearLayout);
- pnl_bearLayout.setHorizontalGroup(
- pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl_bearLayout.createSequentialGroup()
- .addGroup(pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_bearLayout.createSequentialGroup()
- .addGap(63, 63, 63)
- .addGroup(pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_bearLayout.createSequentialGroup()
- .addComponent(lbl_imgBear)
- .addGap(18, 18, 18)
- .addGroup(pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbl_info1Bear)
- .addComponent(lbl_info1AttributesBe)
- .addComponent(lbl_info2AttributesBe)
- .addComponent(lbl_info3AttributesBe)
- .addComponent(lbl_titleBear)))
- .addGroup(pnl_bearLayout.createSequentialGroup()
- .addGap(218, 218, 218)
- .addGroup(pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbl_info2Bear)
- .addComponent(lbl_info1BehaviorsBe)
- .addComponent(lbl_info2BehaviorsBe)
- .addComponent(lbl_info3BehaviorsBe)))))
- .addGroup(pnl_bearLayout.createSequentialGroup()
- .addGap(40, 40, 40)
- .addComponent(btn_sloth)
- .addGap(62, 62, 62)
- .addComponent(btn_eursasian)
- .addGap(60, 60, 60)
- .addComponent(btn_brown)))
- .addContainerGap(324, Short.MAX_VALUE))
- );
- pnl_bearLayout.setVerticalGroup(
- pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_bearLayout.createSequentialGroup()
- .addGap(20, 20, 20)
- .addComponent(lbl_titleBear)
- .addGap(21, 21, 21)
- .addGroup(pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(lbl_imgBear)
- .addGroup(pnl_bearLayout.createSequentialGroup()
- .addComponent(lbl_info1Bear)
- .addGap(7, 7, 7)
- .addComponent(lbl_info1BehaviorsBe)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info2BehaviorsBe)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info3BehaviorsBe)
- .addGap(36, 36, 36)
- .addComponent(lbl_info2Bear)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info1AttributesBe)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info2AttributesBe)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info3AttributesBe)
- .addGap(19, 19, 19)))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)
- .addGroup(pnl_bearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(btn_eursasian)
- .addComponent(btn_sloth)
- .addComponent(btn_brown))
- .addGap(39, 39, 39))
- );
- pnl_bird.setBackground(new java.awt.Color(255, 255, 204));
- //pnl_bird.setVisible(false);
- lnl_titleBird.setFont(new java.awt.Font("Tw Cen MT Condensed", 1, 36)); // NOI18N
- lnl_titleBird.setText("Birds");
- lbl_info1Bird.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
- lbl_info1Bird.setText("Behaviors:");
- lbl_info2Bird.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
- lbl_info2Bird.setText("Attributes:");
- lbl_imgBird.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Benjamin Bird.jpg"))); // NOI18N
- btn_frigate.setText("Maginificent Frigate Bird");
- btn_frigate.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_frigateActionPerformed(evt);
- }
- });
- btn_pigeon.setText("Pigeon");
- btn_pigeon.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_pigeonActionPerformed(evt);
- }
- });
- btn_puffin.setText("Puffin");
- btn_puffin.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_puffinActionPerformed(evt);
- }
- });
- lbl_info1BehaviorsBi.setText("- Dives into water to get inspiration");
- lbl_info2BehaviorsBi.setText("- Combs mustache with claws");
- lbl_info3BehaviorsBi.setText("- Sings to annoy people");
- lbl_info1AttributesBi.setText("- Orange beak");
- lbl_info2AttributesBi.setText("- Black and white feathers");
- lbl_info3AttributesBi.setText("- Short and stubby");
- javax.swing.GroupLayout pnl_birdLayout = new javax.swing.GroupLayout(pnl_bird);
- pnl_bird.setLayout(pnl_birdLayout);
- pnl_birdLayout.setHorizontalGroup(
- pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addGroup(pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addGap(33, 33, 33)
- .addComponent(btn_frigate))
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addGap(53, 53, 53)
- .addComponent(lbl_imgBird)
- .addGap(18, 18, 18)
- .addGroup(pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbl_info1Bird)
- .addComponent(lbl_info2Bird)
- .addComponent(lbl_info1BehaviorsBi)
- .addComponent(lbl_info3BehaviorsBi)
- .addComponent(lbl_info1AttributesBi)
- .addComponent(lbl_info3AttributesBi)
- .addComponent(lnl_titleBird)
- .addComponent(lbl_info2AttributesBi)
- .addGroup(pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(btn_puffin)
- .addComponent(lbl_info2BehaviorsBi))))
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addGap(223, 223, 223)
- .addComponent(btn_pigeon)))
- .addContainerGap(313, Short.MAX_VALUE))
- );
- pnl_birdLayout.setVerticalGroup(
- pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addContainerGap()
- .addComponent(lnl_titleBird)
- .addGroup(pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addGap(39, 39, 39)
- .addGroup(pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_birdLayout.createSequentialGroup()
- .addComponent(lbl_info1Bird)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info1BehaviorsBi)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info2BehaviorsBi)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info3BehaviorsBi)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(lbl_info2Bird)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info1AttributesBi)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info2AttributesBi)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbl_info3AttributesBi))
- .addComponent(lbl_imgBird))
- .addGap(43, 115, Short.MAX_VALUE))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl_birdLayout.createSequentialGroup()
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addGroup(pnl_birdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(btn_frigate)
- .addComponent(btn_pigeon)
- .addComponent(btn_puffin))
- .addGap(34, 34, 34))))
- );
- pnl_superClass.setBackground(new java.awt.Color(204, 255, 255));
- //pnl_superClass.setVisible(false);
- btn_monkey.setText("Monkeys");
- btn_monkey.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_monkeyActionPerformed(evt);
- }
- });
- btn_bird.setText("Birds");
- btn_bird.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_birdActionPerformed(evt);
- }
- });
- btn_bear.setText("Bears");
- btn_bear.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_bearActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout pnl_superClassLayout = new javax.swing.GroupLayout(pnl_superClass);
- pnl_superClass.setLayout(pnl_superClassLayout);
- pnl_superClassLayout.setHorizontalGroup(
- pnl_superClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(pnl_superClassLayout.createSequentialGroup()
- .addGap(47, 47, 47)
- .addComponent(btn_bear)
- .addGap(93, 93, 93)
- .addComponent(btn_monkey)
- .addGap(107, 107, 107)
- .addComponent(btn_bird)
- .addContainerGap(317, Short.MAX_VALUE))
- );
- pnl_superClassLayout.setVerticalGroup(
- pnl_superClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl_superClassLayout.createSequentialGroup()
- .addContainerGap(30, Short.MAX_VALUE)
- .addGroup(pnl_superClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(btn_monkey)
- .addComponent(btn_bird)
- .addComponent(btn_bear))
- .addGap(32, 32, 32))
- );
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(pnl_superClass, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(pnl_bird, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(pnl_bear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(pnl_monkey, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addGap(0, 379, Short.MAX_VALUE)
- .addComponent(pnl_superClass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(pnl_bird, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 64, Short.MAX_VALUE)))
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(pnl_bear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 70, Short.MAX_VALUE)))
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(pnl_monkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 91, Short.MAX_VALUE)))
- );
- pack();
- }// </editor-fold>
- private void btn_bearActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Ludwig Van Bearthoven.jpg")));
- //CHANGE TITLE TO FRIGATE BIRD
- lbl_titleBear.setText("Bears");
- pnl_bear.setVisible(true);
- pnl_bird.setVisible(false);
- pnl_monkey.setVisible(false);
- pnl_bear.setBackground(new java.awt.Color(204, 255, 204));
- }
- private void btn_monkeyActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgMonkey.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Claudio Giovanni Antonio Monkey.jpg")));
- pnl_bear.setVisible(false);
- pnl_bird.setVisible(false);
- pnl_monkey.setVisible(true);
- //CHANGE TITLE TO FRIGATE BIRD
- lbl_titleMonkey.setText("Monkeys");
- //CHANGES TO SUPER CLASS MONKEY BEHAVIORS
- lbl_info1BehaviorsMo.setText("- Omnivore");
- lbl_info2BehaviorsMo.setText("- Climbs trees");
- lbl_info3BehaviorsMo.setText("- Socialize with others");
- //CHANGES TO SUPER CLASS MONKEY ATTRIBUTES
- lbl_info1AttributesMo.setText("- Social");
- lbl_info2AttributesMo.setText("- Have tails");
- lbl_info3AttributesMo.setText("- Intelligent");
- pnl_monkey.setBackground(new java.awt.Color(196, 182, 225));
- }
- private void btn_birdActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBird.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Benjamin Bird.jpg")));
- //CHANGE TITLE TO BIRD
- lnl_titleBird.setText("Birds");
- pnl_bear.setVisible(false);
- pnl_bird.setVisible(true);
- pnl_monkey.setVisible(false);
- }
- private void btn_patasActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgMonkey.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Henry Patas Monkey.jpg")));
- //CHANGE TITLE TO TAMARIN MONKEY
- lbl_titleMonkey.setText("Patas Monkey");
- //CHANGES TO SUB CLASS PATAS BEHAVIORS
- lbl_info1BehaviorsMo.setText("- Wheres white evening gloves just to walk around casually");
- lbl_info2BehaviorsMo.setText("- Practices the operas he writes in his living room");
- lbl_info3BehaviorsMo.setText("- Swings from tree to tree like Tarzan");
- //CHANGES TO SUB CLASS PATAS ATTRIBUTES
- lbl_info1AttributesMo.setText("- Primped curled hair");
- lbl_info2AttributesMo.setText("- Long tails to whip the haters");
- lbl_info3AttributesMo.setText("- Proper");
- }
- private void btn_capuchinActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgMonkey.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Wilhelm Richard White-Headed Capuchin.jpg")));
- //CHANGE TITLE TO CAPUCHIN MONKEY
- lbl_titleMonkey.setText("Capuchin Monkey");
- //CHANGES TO SUB CLASS CAPUCHIN BEHAVIORS
- lbl_info1BehaviorsMo.setText("- Singing");
- lbl_info2BehaviorsMo.setText("- Jumping");
- lbl_info3BehaviorsMo.setText("- Laughing despite grumpy face");
- //CHANGES TO SUB CLASS CAPUCHIN ATTRIBUTES
- lbl_info1AttributesMo.setText("- White neck");
- lbl_info2AttributesMo.setText("- Gray face");
- lbl_info3AttributesMo.setText("- Black feet");
- }
- private void btn_tamarinActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgMonkey.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Carl Maria Friedrich Emperor Tamarin.jpg")));
- //CHANGE TITLE TO TAMARIN MONKEY
- lbl_titleMonkey.setText("Tamarin Monkey");
- //CHANGES TO SUB CLASS TAMARIN BEHAVIORS
- lbl_info1BehaviorsMo.setText("- Conducts other monkeys in song");
- lbl_info2BehaviorsMo.setText("- Brushes his mustache every time he is done with a performance");
- lbl_info3BehaviorsMo.setText("- Eats a banana split twice everyday");
- //CHANGES TO SUB CLASS TAMARIN ATTRIBUTES
- lbl_info1AttributesMo.setText("- White, long, handlebar mustache");
- lbl_info2AttributesMo.setText("- Brown curly hair");
- lbl_info3AttributesMo.setText("- Small precise hands");
- }
- private void btn_slothActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Franz Peter Slothbert Bear.jpg")));
- //CHANGE TITLE TO SLOTH BEAR
- lbl_titleBear.setText("Sloth Bear");
- //CHANGES TO SUB CLASS SLOTH BEHAVIORS
- lbl_info1BehaviorsBe.setText("- Lounges around in the most comfortable spots before practicing his music");
- lbl_info2BehaviorsBe.setText("- Shows off his musical talents");
- lbl_info3BehaviorsBe.setText("- Stays up all night to party");
- //CHANGES TO SUB CLASS SLOTH ATTRIBUTES
- lbl_info1AttributesBe.setText("- Very, very tall");
- lbl_info2AttributesBe.setText("- Weighs A LOT to show off to the females");
- lbl_info3AttributesBe.setText("- Long sharp claws");
- }
- private void btn_eursasianActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Johann Sebursian Bear.jpg")));
- //CHANGE TITLE TO EURASION BEAR
- lbl_titleBear.setText("Eurasion Bear");
- //CHANGES TO SUB CLASS EURASION BEHAVIORS
- lbl_info1BehaviorsBe.setText("- Conducting music");
- lbl_info2BehaviorsBe.setText("- Always active");
- lbl_info3BehaviorsBe.setText("- Playing the violin");
- //CHANGES TO SUB CLASS EURASION ATTRIBUTES
- lbl_info1AttributesBe.setText("- Puffy white hair");
- lbl_info2AttributesBe.setText("- Brown fur");
- lbl_info3AttributesBe.setText("- Clipped claws");
- }
- private void btn_brownActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Johannes Brown Bear.jpg")));
- //CHANGE TITLE TO BROWN BEAR
- lbl_titleBear.setText("Brown Bear");
- //CHANGES TO SUB CLASS BROWN BEHAVIORS
- lbl_info1BehaviorsBe.setText("- Plays piano gently despite his enormous paws");
- lbl_info2BehaviorsBe.setText("- Swims with the fish to get them to trust him before eating them");
- lbl_info3BehaviorsBe.setText("- Stands on small rocks in fear of alligators and sharks");
- //CHANGES TO SUB CLASS BROWN ATTRIBUTES
- lbl_info1AttributesBe.setText("- Brown furry creatures");
- lbl_info2AttributesBe.setText("- Fat (they need to lay off of the fish a little bit)");
- lbl_info3AttributesBe.setText("- Prideful of himself (he can play many, many instruments along with the piano)");
- }
- private void btn_frigateActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBird.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Gabriel Fauré magnificent frigate bird.jpg")));
- //CHANGE TITLE TO FRIGATE BIRD
- lnl_titleBird.setText("Frigate Bird");
- //CHANGES TO SUB CLASS FRIGATE BEHAVIORS
- lbl_info1BehaviorsBi.setText("- Afraid of water (only eat flying fish)");
- lbl_info2BehaviorsBi.setText("- Jumps on the piano to create songs");
- lbl_info3BehaviorsBi.setText("- Chill in its beach nest and relax");
- //CHANGES TO SUB CLASS FRIGATE ATTRIBUTES
- lbl_info1AttributesBi.setText("- Bright red throat puffs out when it has an idea");
- lbl_info2AttributesBi.setText("- Long beak (all talk)");
- lbl_info3AttributesBi.setText("- Red demon eyes");
- }
- private void btn_pigeonActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBird.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Sergi Pigeon.jpg")));
- //CHANGE TITLE TO PIGEON BIRD
- lnl_titleBird.setText("Pigeon Bird");
- //CHANGES TO SUB CLASS PIGEON BEHAVIORS
- lbl_info1BehaviorsBi.setText("- Loves to take food from people walking in the street");
- lbl_info2BehaviorsBi.setText("- Creates round dents in cars with slicked hair and round heads");
- lbl_info3BehaviorsBi.setText("- Plays beautiful songs on the piano instead of chirping");
- //CHANGES TO SUB CLASS PIGEON ATTRIBUTES
- lbl_info1AttributesBi.setText("- Steady talons");
- lbl_info2AttributesBi.setText("- Green metallic feathers to reflect off negativity");
- lbl_info3AttributesBi.setText("- Slick hair");
- }
- private void btn_puffinActionPerformed(java.awt.event.ActionEvent evt) {
- lbl_imgBird.setIcon(new javax.swing.ImageIcon(getClass().getResource("/zoogui/Giacomo Antonio Domenico Michele Secondo Maria Puffin.jpg")));
- //CHANGE TITLE TO PUFFIN BIRD
- lnl_titleBird.setText("Puffin Bird");
- //CHANGES TO SUB CLASS PUFFIN BEHAVIORS
- lbl_info1BehaviorsBi.setText("- Dives into water to get inspiration for songs");
- lbl_info2BehaviorsBi.setText("- Combs mustache with claws");
- lbl_info3BehaviorsBi.setText("- Sings to annoy people");
- //CHANGES TO SUB CLASS PUFFIN ATTRIBUTES
- lbl_info1AttributesBi.setText("- Orange beak (called a copy bird)");
- lbl_info2AttributesBi.setText("- Black and white feathers");
- lbl_info3AttributesBi.setText("- Short and stubby as to contrast between its large voice");
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- /* Set the Nimbus look and feel */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
- if ("Nimbus".equals(info.getName())) {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- } catch (ClassNotFoundException ex) {
- java.util.logging.Logger.getLogger(zoogui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (InstantiationException ex) {
- java.util.logging.Logger.getLogger(zoogui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- java.util.logging.Logger.getLogger(zoogui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- java.util.logging.Logger.getLogger(zoogui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
- /* Create and display the form */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new zoogui().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JButton btn_bear;
- private javax.swing.JButton btn_bird;
- private javax.swing.JButton btn_brown;
- private javax.swing.JButton btn_capuchin;
- private javax.swing.JButton btn_eursasian;
- private javax.swing.JButton btn_frigate;
- private javax.swing.JButton btn_monkey;
- private javax.swing.JButton btn_patas;
- private javax.swing.JButton btn_pigeon;
- private javax.swing.JButton btn_puffin;
- private javax.swing.JButton btn_sloth;
- private javax.swing.JButton btn_tamarin;
- private javax.swing.JButton jButton1;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JLabel lbl_imgBear;
- private javax.swing.JLabel lbl_imgBird;
- private javax.swing.JLabel lbl_imgMonkey;
- private javax.swing.JLabel lbl_info1AttributesBe;
- private javax.swing.JLabel lbl_info1AttributesBi;
- private javax.swing.JLabel lbl_info1AttributesMo;
- private javax.swing.JLabel lbl_info1Bear;
- private javax.swing.JLabel lbl_info1BehaviorsBe;
- private javax.swing.JLabel lbl_info1BehaviorsBi;
- private javax.swing.JLabel lbl_info1BehaviorsMo;
- private javax.swing.JLabel lbl_info1Bird;
- private javax.swing.JLabel lbl_info1Monkey;
- private javax.swing.JLabel lbl_info2AttributesBe;
- private javax.swing.JLabel lbl_info2AttributesBi;
- private javax.swing.JLabel lbl_info2AttributesMo;
- private javax.swing.JLabel lbl_info2Bear;
- private javax.swing.JLabel lbl_info2BehaviorsBe;
- private javax.swing.JLabel lbl_info2BehaviorsBi;
- private javax.swing.JLabel lbl_info2BehaviorsMo;
- private javax.swing.JLabel lbl_info2Bird;
- private javax.swing.JLabel lbl_info2Monkey;
- private javax.swing.JLabel lbl_info3AttributesBe;
- private javax.swing.JLabel lbl_info3AttributesBi;
- private javax.swing.JLabel lbl_info3AttributesMo;
- private javax.swing.JLabel lbl_info3BehaviorsBe;
- private javax.swing.JLabel lbl_info3BehaviorsBi;
- private javax.swing.JLabel lbl_info3BehaviorsMo;
- private javax.swing.JLabel lbl_titleBear;
- private javax.swing.JLabel lbl_titleMonkey;
- private javax.swing.JLabel lnl_titleBird;
- private javax.swing.JPanel pnl_bear;
- private javax.swing.JPanel pnl_bird;
- private javax.swing.JPanel pnl_monkey;
- private javax.swing.JPanel pnl_opener;
- private javax.swing.JPanel pnl_superClass;
- // End of variables declaration
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement