diff --git a/.idea/artifacts/exposicao_autores_modernismo_jar.xml b/.idea/artifacts/exposicao_autores_modernismo_jar.xml new file mode 100644 index 0000000..6a2b4be --- /dev/null +++ b/.idea/artifacts/exposicao_autores_modernismo_jar.xml @@ -0,0 +1,10 @@ + + + $PROJECT_DIR$/out/artifacts/exposicao_autores_modernismo_jar + + + + + + + \ No newline at end of file diff --git a/.idea/exposicao-autores-modernismo.iml b/.idea/exposicao-autores-modernismo.iml new file mode 100644 index 0000000..9834625 --- /dev/null +++ b/.idea/exposicao-autores-modernismo.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 5b60cf6..5142ff6 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/resources/META-INF/MANIFEST.MF b/resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..32cecfe --- /dev/null +++ b/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: amostraonline.AmostraOnline + diff --git a/src/test/java/amostraonline/AmostraOnline.java b/src/amostraonline/AmostraOnline.java similarity index 100% rename from src/test/java/amostraonline/AmostraOnline.java rename to src/amostraonline/AmostraOnline.java diff --git a/src/test/java/amostraonline/frames/AutoursFrame.form b/src/amostraonline/frames/AutoursFrame.form similarity index 100% rename from src/test/java/amostraonline/frames/AutoursFrame.form rename to src/amostraonline/frames/AutoursFrame.form diff --git a/src/test/java/amostraonline/frames/AutoursFrame.java b/src/amostraonline/frames/AutoursFrame.java similarity index 91% rename from src/test/java/amostraonline/frames/AutoursFrame.java rename to src/amostraonline/frames/AutoursFrame.java index e2458d6..0472cd9 100644 --- a/src/test/java/amostraonline/frames/AutoursFrame.java +++ b/src/amostraonline/frames/AutoursFrame.java @@ -9,6 +9,8 @@ import javax.swing.JFrame; import javax.swing.JOptionPane; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.io.IOException; /** @@ -22,13 +24,17 @@ public class AutoursFrame extends javax.swing.JFrame { ImageIcon ImageCecilia = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/cecilia.png")).getSource())); //Aqui está sendo criada objetos que são usados para representar uma imagem que será exibida na interface gráfica. - // O toolkit é uma classe que consegue criar imagens a partir de arquivos de dentro do aplicativo + // O Tollkit pega a imagem de dentro do executável para a tela + public AutoursFrame() throws IOException { initComponents(); this.setLocation(500,200); //Indica a localização aonde a janela será gerada this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Indica que quando o usuário fechar a janela, todos os processos serão finalizados this.setTitle("Autores"); //Indica o título da janela + this.imagemCarlos.setIcon(ImageCarlos); + this.imagemVinicius.setIcon(ImageVinicius); + this.imagemCecilia.setIcon(ImageCecilia); } /** @@ -42,15 +48,15 @@ private void initComponents() { jLabel1 = new javax.swing.JLabel(); imagemCarlos = new javax.swing.JLabel(); - jButton1 = new javax.swing.JButton(); + jButton1 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); SaibaMaisCarlos = new javax.swing.JButton(); SaibaMaisVinicius = new javax.swing.JButton(); imagemVinicius = new javax.swing.JLabel(); - jButton2 = new javax.swing.JButton(); + jButton2 = new javax.swing.JLabel(); SaibaMaisCarlos2 = new javax.swing.JButton(); imagemCecilia = new javax.swing.JLabel(); - jButton3 = new javax.swing.JButton(); + jButton3 = new javax.swing.JLabel(); jButton4 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); @@ -59,13 +65,6 @@ private void initComponents() { jLabel1.setText("Principais autores do modernismo brasileiro"); jButton1.setText("Carlos Drummond"); - jButton1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton1ActionPerformed(evt); - } - }); - - jLabel3.setText("Aperte no botão para ver a imagem do autor"); SaibaMaisCarlos.setText("Saiba Mais!"); SaibaMaisCarlos.addActionListener(new java.awt.event.ActionListener() { @@ -82,11 +81,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); jButton2.setText("Vinicius de Moraes"); - jButton2.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton2ActionPerformed(evt); - } - }); SaibaMaisCarlos2.setText("Saiba Mais!"); SaibaMaisCarlos2.addActionListener(new java.awt.event.ActionListener() { @@ -96,16 +90,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); jButton3.setText("Cecília Meireles"); - jButton3.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton3ActionPerformed(evt); - } - }); jButton4.setText("Sair"); - jButton4.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton4ActionPerformed(evt); + + jButton4.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + System.exit(0); } }); @@ -295,9 +286,9 @@ public void run() { private javax.swing.JLabel imagemCarlos; private javax.swing.JLabel imagemCecilia; private javax.swing.JLabel imagemVinicius; - private javax.swing.JButton jButton1; - private javax.swing.JButton jButton2; - private javax.swing.JButton jButton3; + private javax.swing.JLabel jButton1; + private javax.swing.JLabel jButton2; + private javax.swing.JLabel jButton3; private javax.swing.JButton jButton4; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel3; diff --git a/src/test/java/amostraonline/frames/ObrasCarlosFrame.form b/src/amostraonline/frames/ObrasCarlosFrame.form similarity index 100% rename from src/test/java/amostraonline/frames/ObrasCarlosFrame.form rename to src/amostraonline/frames/ObrasCarlosFrame.form diff --git a/src/test/java/amostraonline/frames/ObrasCarlosFrame.java b/src/amostraonline/frames/ObrasCarlosFrame.java similarity index 100% rename from src/test/java/amostraonline/frames/ObrasCarlosFrame.java rename to src/amostraonline/frames/ObrasCarlosFrame.java diff --git a/src/test/java/amostraonline/frames/ObrasViniciusFrame.form b/src/amostraonline/frames/ObrasViniciusFrame.form similarity index 100% rename from src/test/java/amostraonline/frames/ObrasViniciusFrame.form rename to src/amostraonline/frames/ObrasViniciusFrame.form diff --git a/src/test/java/amostraonline/frames/ObrasViniciusFrame.java b/src/amostraonline/frames/ObrasViniciusFrame.java similarity index 100% rename from src/test/java/amostraonline/frames/ObrasViniciusFrame.java rename to src/amostraonline/frames/ObrasViniciusFrame.java diff --git a/src/test/java/amostraonline/frames/SaibaCarlosFrame.form b/src/amostraonline/frames/SaibaCarlosFrame.form similarity index 100% rename from src/test/java/amostraonline/frames/SaibaCarlosFrame.form rename to src/amostraonline/frames/SaibaCarlosFrame.form diff --git a/src/test/java/amostraonline/frames/SaibaCarlosFrame.java b/src/amostraonline/frames/SaibaCarlosFrame.java similarity index 96% rename from src/test/java/amostraonline/frames/SaibaCarlosFrame.java rename to src/amostraonline/frames/SaibaCarlosFrame.java index b3ea60d..720430e 100644 --- a/src/test/java/amostraonline/frames/SaibaCarlosFrame.java +++ b/src/amostraonline/frames/SaibaCarlosFrame.java @@ -19,6 +19,7 @@ public class SaibaCarlosFrame extends javax.swing.JFrame { ImageIcon ImageCarlos = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/carlos.png")).getSource())); //Aqui está sendo criada objetos que são usados para representar uma imagem que será exibida na interface gráfica. + //O TollKit pega a imagem de dentro do executável e exibe na tela public SaibaCarlosFrame() throws IOException { initComponents(); @@ -38,7 +39,7 @@ private void initComponents() { jLabel1 = new javax.swing.JLabel(); imagemCarlos = new javax.swing.JLabel(); - jButton1 = new javax.swing.JButton(); + jButton1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); @@ -51,14 +52,8 @@ private void initComponents() { jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N jLabel1.setText("Carlos Drummond de Andrade"); - imagemCarlos.setText(""); + imagemCarlos.setIcon(ImageCarlos); - jButton1.setText("Gerar imagem"); - jButton1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton1ActionPerformed(evt); - } - }); jLabel2.setText("Nascimento: 31 de outubro de 1902"); @@ -208,7 +203,7 @@ public void run() { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton botaoVoltar; private javax.swing.JLabel imagemCarlos; - private javax.swing.JButton jButton1; + private javax.swing.JLabel jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; diff --git a/src/test/java/amostraonline/frames/SaibaCeciliaFrame.form b/src/amostraonline/frames/SaibaCeciliaFrame.form similarity index 100% rename from src/test/java/amostraonline/frames/SaibaCeciliaFrame.form rename to src/amostraonline/frames/SaibaCeciliaFrame.form diff --git a/src/test/java/amostraonline/frames/SaibaCeciliaFrame.java b/src/amostraonline/frames/SaibaCeciliaFrame.java similarity index 96% rename from src/test/java/amostraonline/frames/SaibaCeciliaFrame.java rename to src/amostraonline/frames/SaibaCeciliaFrame.java index 2f30f56..1e887ad 100644 --- a/src/test/java/amostraonline/frames/SaibaCeciliaFrame.java +++ b/src/amostraonline/frames/SaibaCeciliaFrame.java @@ -38,7 +38,7 @@ public SaibaCeciliaFrame() throws IOException { private void initComponents() { jLabel1 = new javax.swing.JLabel(); - BotaoCecilia = new javax.swing.JButton(); + BotaoCecilia = new javax.swing.JLabel(); ImagemCecilia = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); @@ -52,12 +52,8 @@ private void initComponents() { jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N jLabel1.setText("Cecília Meireles"); - BotaoCecilia.setText("Gerar Imagem"); - BotaoCecilia.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - BotaoCeciliaActionPerformed(evt); - } - }); + BotaoCecilia.setIcon(ImageCecilia); + ImagemCecilia.setText(""); @@ -210,7 +206,7 @@ public void run() { } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton BotaoCecilia; + private javax.swing.JLabel BotaoCecilia; private javax.swing.JButton BotaoObras; private javax.swing.JButton BotaoVolta; private javax.swing.JLabel ImagemCecilia; diff --git a/src/test/java/amostraonline/frames/SaibaViniciusFrame.form b/src/amostraonline/frames/SaibaViniciusFrame.form similarity index 100% rename from src/test/java/amostraonline/frames/SaibaViniciusFrame.form rename to src/amostraonline/frames/SaibaViniciusFrame.form diff --git a/src/test/java/amostraonline/frames/SaibaViniciusFrame.java b/src/amostraonline/frames/SaibaViniciusFrame.java similarity index 96% rename from src/test/java/amostraonline/frames/SaibaViniciusFrame.java rename to src/amostraonline/frames/SaibaViniciusFrame.java index a21a1c1..66c31dd 100644 --- a/src/test/java/amostraonline/frames/SaibaViniciusFrame.java +++ b/src/amostraonline/frames/SaibaViniciusFrame.java @@ -37,7 +37,7 @@ public SaibaViniciusFrame() throws IOException { private void initComponents() { jLabel1 = new javax.swing.JLabel(); - jButton1 = new javax.swing.JButton(); + jButton1 = new javax.swing.JPanel(); imagemVinicius = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); @@ -51,15 +51,8 @@ private void initComponents() { jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N jLabel1.setText("Vinicius de Moraes"); - jButton1.setText("Gerar Imagem"); - jButton1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton1ActionPerformed(evt); - } - }); - - imagemVinicius.setText(""); + imagemVinicius.setIcon(ImageVinicius); jLabel3.setText("Nascimento: 19 de outubro de 1913"); jLabel4.setText("Falecimento: 9 de julho de 1980"); @@ -209,7 +202,7 @@ public void run() { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton ObrasVinicius; private javax.swing.JLabel imagemVinicius; - private javax.swing.JButton jButton1; + private javax.swing.JPanel jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel3;