Questions tagged as 'java'

1
answer

How to automatically play audio at startup of a program?

I want the audio to play as soon as the software starts. If you have any suggestions for placement of the audio button in the main frame, the will ... Here is code for review: Main class package Interface; public class Main { publi...
asked by 24.11.2017 / 13:41
1
answer

Create variable in iReport for the database

I need to create a report of the selected month with the information contained in the database, so I want to create a variable in iReport that receives the month (by netbens) which will be compared to the existing sqll in Ireport that is connect...
asked by 16.08.2017 / 16:41
2
answers

JSON for XLS in java

Is it possible to transform a JSON into XLS with java? I've done an algorithm that writes JSON to CSV, but XLS does not. If they can post libraries or examples.     
asked by 17.08.2017 / 13:20
1
answer

JobScheduler to run every x hours

I need to run an api access in a range of hours, for example every 3 hours. I was looking for ways to do this, I read about AlarmManager and about this JobScheduler that seems to be the latest. Is it correct for my purpose to use it? Is it...
asked by 29.07.2017 / 02:33
1
answer

How do I remove listeners according to the state of the component?

I have a JLabel that receives an event, and would like to disable this event when the component is disabled (setEnable = false), and only activate it again when the component is enabled. What I did: import java.awt.Cursor; import java.awt.e...
asked by 30.07.2017 / 22:20
1
answer

As per a JScrollPane in a JTextArea?

I'm trying to create a project where I print multiple phrases in a JTextArea , but for this, I need to include a JScrollPane . I looked at some examples on the internet but none are working. public class Projeto extends JFrame {...
asked by 22.08.2017 / 14:01
2
answers

Output warning in WebView

I'm very new to android, so I did my application through Android Studio using WebView, but I'm having a question, when I press the Android back button it's already quit the app, I'd like to add that warning: do you want to leave?) AndroidActi...
asked by 07.06.2017 / 18:53
1
answer

How do I set the buttons in AlertDialog?

I'm having a problem with buttons created in AlertDialog. I'm doing an APP of sentences and at certain times the sentences are very big and causes the buttons in AlertDialog to come down. Is it possible to fix these buttons? Here is an example o...
asked by 07.06.2017 / 16:25
1
answer

Doubt about changing data in arrays in java

I have an array of the Person class called vector. I have already populated the vector with the instances of people named p1 . My question is how to change the value of p1 when inside the array : Example: Person Array n...
asked by 08.06.2017 / 21:10
2
answers

Java (Android) - Mathematical Equations

I need a little help. To get straight to the point, I was trying to create a small set of equations that would allow me to get a set of numbers with a few peculiarities. Basically what I wanted, after pressing a button, was to create four random...
asked by 11.07.2017 / 23:35