Questions tagged as 'java'

1
answer

Finding Active Threads

I have the following problem, where I have a for() that opens 17 threads and need to retrieve, in another thread (18th) the active threads I opened earlier and check which ones are still active. I took a look around the internet, but I di...
asked by 20.04.2016 / 19:05
2
answers

I can not format date

I'm trying to format one date to be the same as another, the first comes straight from the bank but the other needs to be in the same format. Calendar cal = Calendar.getInstance(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); Stri...
asked by 03.07.2018 / 00:00
2
answers

Converting string to long int

I have an activity to do in which the teacher asks that the names of the numbers be converted into integers ( long int ). I would like to know if there is a function in Java that does this ... I searched in some places, but found nothing that...
asked by 18.11.2017 / 14:04
1
answer

Android - DatePicker in an editText

Next, I would like a date selector to appear as soon as I click on the editText that I have, but what I found is automatically placing the current date, I want it to be chosen ... Here is the code I've tried so far: public class AtividadePr...
asked by 23.05.2017 / 07:41
1
answer

How do I change the background of a button when clicked?

I need to change the background of a button when it is clicked. Here is the code I tried: private Button btn; private int colorFlag = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...
asked by 30.05.2017 / 16:39
1
answer

Modifications in JFreeChart

I'd like to know how I can change the colors of the "slices" in the chart and the font in which the content and percentage are written. It's possible? at least the colors. package grafico; import java.awt.Color; import java.awt.Dimension; imp...
asked by 26.05.2017 / 17:19
1
answer

How do I perform an algorithm when the user stops touching the screen?

I would like, when the user presses the screen, open a horizontal menu with 4 options where the option to which he will release his finger on top will be the one selected. The press event I already know. would be this: btn_operacao.setOnLon...
asked by 16.01.2018 / 00:13
1
answer

Problems with NullPointerException

I'm doing a Java application using 5.1 primefaces and it was working correctly to delete students in version 2.1 before upgrading to version 5.1. I'm trying to delete a student, but this error appears. But when you return to the page the stud...
asked by 29.06.2017 / 01:54
1
answer

How to correctly use BufferedInputStream?

I'm creating an application in which I need to read from a video file and transmit packets of data that can be read back into memory. I am using the Ogg video format because it is open source and because I found it simpler to understand. I used...
asked by 01.08.2017 / 23:36
1
answer

How to leave more than one transparent panel?

Implementing the response response, I was able to leave a transparent panel. However, to be able to organize the way I want, I wanted to use more JPanels , with different layout managers. But when I do this, they do not become transpa...
asked by 01.04.2018 / 19:59