Skip to content

Commit

Permalink
Atualização do método de pegar as imagens (o que ajudou na organizaçã…
Browse files Browse the repository at this point in the history
…o do projeto) e correção das barras aparentes no JLabel que hospedava as imagens
  • Loading branch information
AlexeyFrens committed Jun 13, 2023
1 parent 8909c35 commit 1e66637
Show file tree
Hide file tree
Showing 211 changed files with 347 additions and 65 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

13 changes: 13 additions & 0 deletions .idea/compiler.xml

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

7 changes: 7 additions & 0 deletions .idea/encodings.xml

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

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

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

14 changes: 14 additions & 0 deletions .idea/misc.xml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

10 changes: 10 additions & 0 deletions exposicao-autores-modernismo.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$" dumb="true">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</component>
</module>
2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jlink.additionalmodules=
jlink.additionalparam=
jlink.launcher=true
jlink.launcher.name=amostraOnline
main.class=amostraonline.AmostraOnline
main.class=main.java.amostraonline.AmostraOnline
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
Expand Down
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>groupId</groupId>
<artifactId>exposicao-autores-modernismo</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

</project>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@
*/
package amostraonline.frames;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import java.awt.*;
import java.io.IOException;

/**
*
* @author João Cláudio
*/
public class AutoursFrame extends javax.swing.JFrame {

ImageIcon ImageCarlos = new ImageIcon("carlos.png");
ImageIcon ImageVinicius = new ImageIcon("vinicius.png");
ImageIcon ImageCecilia = new ImageIcon("cecilia.png");
ImageIcon ImageCarlos = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/carlos.png")).getSource()));
ImageIcon ImageVinicius = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/vinicius.png")).getSource()));
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

public AutoursFrame() {
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
Expand Down Expand Up @@ -195,13 +199,21 @@ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
}//GEN-LAST:event_jButton1ActionPerformed

private void SaibaMaisCarlosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SaibaMaisCarlosActionPerformed
new SaibaCarlosFrame().setVisible(true);
try {
new SaibaCarlosFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();
//Quando o usuário apertar o botão uma nova janela será criada e a janela aberta se fechará
}//GEN-LAST:event_SaibaMaisCarlosActionPerformed

private void SaibaMaisViniciusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SaibaMaisViniciusActionPerformed
new SaibaViniciusFrame().setVisible(true);
try {
new SaibaViniciusFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();
//Quando o usuário apertar o botão uma nova janela será criada e a janela aberta se fechará
}//GEN-LAST:event_SaibaMaisViniciusActionPerformed
Expand All @@ -211,7 +223,11 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
}//GEN-LAST:event_jButton2ActionPerformed

private void SaibaMaisCarlos2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SaibaMaisCarlos2ActionPerformed
new SaibaCeciliaFrame().setVisible(true);
try {
new SaibaCeciliaFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();
//Quando o usuário apertar o botão uma nova janela será criada e a janela aberta se fechará
}//GEN-LAST:event_SaibaMaisCarlos2ActionPerformed
Expand All @@ -221,7 +237,11 @@ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
}//GEN-LAST:event_jButton3ActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
new AutoursFrame().setVisible(false);
try {
new AutoursFrame().setVisible(false);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();

JOptionPane.showMessageDialog(null, "Obrigado pela visita!!!");
Expand Down Expand Up @@ -259,7 +279,11 @@ public static void main(String args[]) {
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AutoursFrame().setVisible(true);
try {
new AutoursFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
});
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import java.io.IOException;

/**
*
Expand Down Expand Up @@ -91,7 +92,11 @@ private void NextPageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
JOptionPane.showMessageDialog(null, "Coloque o nome no campo em branco para continuar", "Não há nome!", JOptionPane.WARNING_MESSAGE);
}else{
JOptionPane.showMessageDialog(NextPage,"Bem Vindo(a) "+UsernameInput.getText()+"!");
new AutoursFrame().setVisible(true);
try {
new AutoursFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();
}
}//GEN-LAST:event_NextPageActionPerformed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@
*/
package amostraonline.frames;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import java.awt.*;
import java.io.IOException;

/**
*
* @author João Cláudio
*/
public class ObrasCarlosFrame extends javax.swing.JFrame {

ImageIcon ImageContosdeAprendiz = new ImageIcon("contos-de-aprendiz.png");
ImageIcon ImageBocadeLuar = new ImageIcon("boca-de-luar.png");
ImageIcon ImageRosadoPovo = new ImageIcon("a-rosa-do-povo.png");
ImageIcon ImageSentimentodoMundo = new ImageIcon("Sentimento-no-mundo.png");
ImageIcon ImageAntologiaPoetica = new ImageIcon("Antologia-poetica.png");
ImageIcon ImageBolsaeaVida = new ImageIcon("a-bolsa-e-a-vida.png");
ImageIcon ImageCadeiraBalanco = new ImageIcon("cadeira-de-balanco.png");
ImageIcon ImageAmarAprendeAmando = new ImageIcon("amar-se-aprende-amando.png");
ImageIcon ImageContosdeAprendiz = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/contos-de-aprendiz.png")).getSource()));
ImageIcon ImageBocadeLuar = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/boca-de-luar.png")).getSource()));
ImageIcon ImageRosadoPovo = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/a-rosa-do-povo.png")).getSource()));
ImageIcon ImageSentimentodoMundo = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/sentimento-no-mundo.png")).getSource()));
ImageIcon ImageAntologiaPoetica = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/Antologia-poetica.png")).getSource()));
ImageIcon ImageBolsaeaVida = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/a-bolsa-e-a-vida.png")).getSource()));
ImageIcon ImageCadeiraBalanco = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/cadeira-de-balanco.png")).getSource()));
ImageIcon ImageAmarAprendeAmando = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/amar-se-aprende-amando.png")).getSource()));

//Aqui está sendo criada objetos que são usados para representar uma imagem que será exibida na interface gráfica.


public ObrasCarlosFrame() {
public ObrasCarlosFrame() throws IOException {
initComponents();
this.setLocation(500,200); //Indica a localização que 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
Expand Down Expand Up @@ -97,7 +100,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
}
});

imagemObra.setText("|");
imagemObra.setText("");

botaoBocadeLuar.setText("->");
botaoBocadeLuar.addActionListener(new java.awt.event.ActionListener() {
Expand Down Expand Up @@ -247,7 +250,11 @@ private void botaoAmarAprendeAmandoActionPerformed(java.awt.event.ActionEvent ev
}//GEN-LAST:event_botaoAmarAprendeAmandoActionPerformed

private void botaoVoltarObrasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoVoltarObrasActionPerformed
new SaibaCarlosFrame().setVisible(true);
try {
new SaibaCarlosFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();

//Quando o botão voltar for acionado, uma nova janela será criada e a janela apresentada para o usuário será finalizada
Expand Down Expand Up @@ -283,7 +290,11 @@ public static void main(String args[]) {
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ObrasCarlosFrame().setVisible(true);
try {
new ObrasCarlosFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@
*/
package amostraonline.frames;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import java.awt.*;
import java.io.IOException;

/**
*
* @author João Cláudio
*/
public class ObrasCeciliaFrame extends javax.swing.JFrame {

ImageIcon ImageEspectros = new ImageIcon("espectros.png");
ImageIcon ImageCriancaAmor = new ImageIcon("crianca-amor.png");
ImageIcon ImageNuncaMais = new ImageIcon("nunca-mais.png");
ImageIcon ImageBaladas = new ImageIcon("baladas-rei.png");
ImageIcon ImageEspirito = new ImageIcon("espirito-vitorioso.png");
ImageIcon ImageViagem = new ImageIcon("viagem.png");
ImageIcon ImageBatuque = new ImageIcon("batuque-samba.png");
ImageIcon ImageFestaLetras = new ImageIcon("festa-letras.png");
ImageIcon ImageEspectros = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/espectros.png")).getSource()));
ImageIcon ImageCriancaAmor = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/crianca-amor.png")).getSource()));
ImageIcon ImageNuncaMais = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/nunca-mais.png")).getSource()));
ImageIcon ImageBaladas = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/baladas-rei.png")).getSource()));
ImageIcon ImageEspirito = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/espirito-vitorioso.png")).getSource()));
ImageIcon ImageViagem = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/viagem.png")).getSource()));
ImageIcon ImageBatuque = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/batuque-samba.png")).getSource()));
ImageIcon ImageFestaLetras = new ImageIcon(Toolkit.getDefaultToolkit().createImage(ImageIO.read(AutoursFrame.class.getResourceAsStream("/festa-letras.png")).getSource()));

//Aqui está sendo criada objetos que são usados para representar uma imagem que será exibida na interface gráfica.

public ObrasCeciliaFrame() {
public ObrasCeciliaFrame() throws IOException {
initComponents();
this.setLocation(500,200); //Indica a localização que 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
Expand Down Expand Up @@ -144,7 +147,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
}
});

imagemObras.setText("|");
imagemObras.setText("");

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
Expand Down Expand Up @@ -243,7 +246,11 @@ private void BotaoFestaLetraActionPerformed(java.awt.event.ActionEvent evt) {//G
}//GEN-LAST:event_BotaoFestaLetraActionPerformed

private void BotaoVoltaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoVoltaActionPerformed
new SaibaCeciliaFrame().setVisible(true);
try {
new SaibaCeciliaFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
dispose();

//Quando o botão voltar for acionado, uma nova janela será criada e a janela apresentada para o usuário será finalizada
Expand Down Expand Up @@ -279,7 +286,11 @@ public static void main(String args[]) {
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ObrasCeciliaFrame().setVisible(true);
try {
new ObrasCeciliaFrame().setVisible(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
});
}
Expand Down
Loading

0 comments on commit 1e66637

Please sign in to comment.