Skip to content

Commit

Permalink
Coomentarios antes de producir el JAR ejecutable
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyGarcia committed Sep 2, 2019
1 parent cee4c5a commit 9ffd09d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
66 changes: 66 additions & 0 deletions pom.xml
Expand Up @@ -11,4 +11,70 @@
<maven.compiler.target>12</maven.compiler.target>
</properties>
<name>mh_experiment</name>

<build>
<finalName>${project.artifactId}_${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>write-project-properties</goal>
</goals>
<configuration>
<outputFile>${project.build.outputDirectory}/my.properties</outputFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>com.panamahitek.GUI</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
1 change: 1 addition & 0 deletions src/main/java/com/panamahitek/GUI.form
Expand Up @@ -35,6 +35,7 @@
</NonVisualComponents>
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
<Property name="title" type="java.lang.String" value="Monty Hall Experiment"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/panamahitek/GUI.java
Expand Up @@ -59,6 +59,7 @@ private void initComponents() {
);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Monty Hall Experiment");

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Condiciones del experimento", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 0, 16))); // NOI18N

Expand Down Expand Up @@ -292,10 +293,11 @@ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
long winAndNoChange = 0;
long lossAndChange = 0;
long lossAndNoChange = 0;

//Cantidad de opciones (puertas)
int options = Integer.parseInt(jTextField4.getText());
//Se ejecuta un loop que repetira el algoritmo la cantidad de veces que el usuario especifique
for (long i = 1; i <= Long.parseLong(jTextField3.getText()); i++) {
//Cantidad de opciones (puertas)
int options = Integer.parseInt(jTextField4.getText());
//Se agregan las opciones a una lista
List<Integer> doors = new ArrayList<>();
for (int j = 1; j <= options; j++) {
Expand Down

0 comments on commit 9ffd09d

Please sign in to comment.