Skip to content

Commit

Permalink
Atualização do método de geração das imagens, permitindo o não uso de…
Browse files Browse the repository at this point in the history
… botão
  • Loading branch information
AlexeyFrens authored and SrBalbucio committed Jun 14, 2023
1 parent 1e66637 commit b22c5bd
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 55 deletions.
10 changes: 10 additions & 0 deletions .idea/artifacts/exposicao_autores_modernismo_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/exposicao-autores-modernismo.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: amostraonline.AmostraOnline

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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);
}

/**
Expand All @@ -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);
Expand All @@ -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() {
Expand All @@ -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() {
Expand All @@ -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);
}
});

Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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");

Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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("");

Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b22c5bd

Please sign in to comment.