Questions tagged as 'java'

1
answer

What do I need to change in this method to work correctly?

This method searches the Customer's phone for the Reservations that are made on it. The Customer may have more than one reservation, but the method is only showing the first booking registered on the client. What should I change in the code t...
asked by 08.06.2017 / 20:15
1
answer

Why do some actions give error if I do not specify View as parameter in Android?

I'm creating a test app with the basic knowledge I got on android since previously I was a java programmer. All of the tutorials I searched for put the View class as the default parameter in their methods, but no one explained why, and hj...
asked by 09.06.2017 / 04:15
2
answers

Generate files with all permissions

I'm generating * .csv files from this: BufferedWriter strW = new BufferedWriter(new FileWriter(caminhoCSV.toString())) But the generated files are only read-only, how could I change this so that the generated file has read and change permis...
asked by 24.08.2017 / 20:19
1
answer

Change the FAB color via code (programmatically)

I'm developing a custom%%, where the colors of the screen elements will vary depending on their properties. Example: If the type property of the Message object displayed is Activity , then the following elements of the "Azul"...
asked by 01.09.2017 / 05:44
1
answer

Redeem same named class values using Selenium

I have a situation where I need to retrieve values from a array of article 's, but I'm not very successful. My HTML looks like this: <section class="list"> <article class="card"> Article by Bigown </arti...
asked by 28.02.2017 / 21:49
1
answer

How to centralize a component using null layout?

My button I want to center is 100 pixels wide. the Jframe is 350 wide. how to centralize? /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open...
asked by 01.03.2017 / 03:24
2
answers

Do I really need to start from a main to run a schedule in java?

I'm developing a web application, and now I've come to a point where I'll have a process running in parallel in my application (in the background) every day at an x time. To test the process, I did a class inside the project with a main, and cir...
asked by 28.03.2018 / 22:34
1
answer

How to capture colors of an image in a JLabel that behind another JLabel?

I need to get the pixel colors of an image embedded in a JLabel with MouseMotionListener , and this JLabel is under or behind another JLabel. I know I can get a background color behind a JLabel, but what I need to capture are colors...
asked by 14.04.2017 / 04:14
1
answer

Error with data display ArrayList

When retrieving data from an arraylist via the "for" command, it displays the following message: Note:Icouldnotidentifywheretheerroris.Whatdoyouguysthinkiswrong?packagelistatelefonica;importjava.util.ArrayList;importjava.util.List;importjava...
asked by 17.04.2017 / 19:02
1
answer

how to make tabbedPane concealable?

I'm having trouble trying to make a tab (tabbedPane) that is displayed according to the status of a CheckBox ("selected / deselected"). I do not know if it is possible, since it will end up changing the size of the screen at runtime. What I'v...
asked by 15.04.2017 / 02:06