Posts by joaopluigi • 51 points
9 posts
-
1
votes1
answer161
viewsA: Code Error for Popular Jlist with File Names of a Folder
If your goal is to "popular a Jlist when starting the program.", the implementation is a little different. There are several ways to do this, using the methods you have already defined, to do the…
-
1
votes1
answer294
viewsA: Problems when drawing an oval on a panel (JAVA)
From what I understand, the error is in every node of the graph being a new Jpanel. The function setBackground ball(Color.white); is setting the background of your Jpanel for white and therefore…
javaanswered joaopluigi 51 -
0
votes1
answer1109
viewsA: Replace numbers with letters inside Arraylist
I wanted to comment, but it seems I don’t have enough reputation. I may not solve your problem, but I can give you some tips: 1 : If you are implementing a calculator the data structure that I…
-
1
votes2
answers129
viewsA: Evolve a basic class in Java
"Is there any way I can instantiate a Puppy based on an existing Animal object?" Do the following: Create a constructor in the Puppy class that receives an Animal as a parameter and pass the values…
javaanswered joaopluigi 51 -
1
votes2
answers261
viewsA: Audioinputstream error ais = Audiosystem.getAudioInputStream(getClass().getResourceAsStream(s));
If you want to run an MP3 file in JAVA you can by importing the class Bigclip for your project and adding the mp3plugin. to your build path. Once this is done just implement the following piece of…
-
0
votes1
answer519
viewsA: Compare lines with txt Java Android
You need to better specify how words will be written in your text and textview file. Whether they will all be on the same line or each one separated by a line break. Anyway, I did a general…
-
0
votes1
answer270
viewsA: How to open another java program in java and get all the information it sends on the console
The question is a little confusing, but if you want to take the data of this program you can try to run it by terminal (console) and assign to a text file. Example: java -jar Programa.jar >…
-
0
votes3
answers240
viewsA: How to know which servers are waiting for connection on my network?
You can try to list the IP of the servers in that lobby. To get the IP of a server you can use the following function: public String getIp() { InetAddress ip; try { ip = InetAddress.getLocalHost();…
-
1
votes2
answers110
viewsA: Build error when sending to third party check
The problem with these sites, such as SPOJ and UVA, is that some do not say how the input should be done. I’ve caught up a lot trying to figure out a solution to input problem in UVA until, at last,…
javaanswered joaopluigi 51