Questions tagged as 'java'

1
answer

How to get the ListView ArrayList?

I have a screen in my application with various fields, spinners and a listview, one of the spinner's is products. When I select a product in the spinner and click on a button called add, the application populates this listview with the id, name,...
asked by 12.05.2016 / 14:27
1
answer

No mapping found for HTTP request with URI [/ Milicia] in DispatcherServlet with name 'dispatcher'

You can not find the uris that I type, it always gives the same error, I have already re-created it and still the error persists. Follow the relevant classes and files. relevant part of pom.xml <build> <finalName>Mili...
asked by 19.10.2016 / 20:33
1
answer

Recognize a JSONObject or JSONArray

I'm developing an app that consumes data from a WebService, which can return one or more records at a time. So far I've always been given a JSONArray, I'd "convert" it: JSONArray arrayDados = new JSONArray(dados); However, when I get only o...
asked by 13.07.2016 / 15:07
1
answer

Spring boot Autowired in JFrame

When developing a Spring Boot Desktop application, can you inject a @Repository into a JFrame class? If yes how? Any alternative? Code samples: @Repository public interface ItemRepository extends CrudRepository<Item, Lon...
asked by 15.07.2016 / 02:43
1
answer

How to create style condition in Jaspersoft Studio?

How can I put a style condition in Jasper Studio by checking if the value is positive put green in the foreground, if it is 0 or negative put red in the foreground? I pass the following to the HashMap datasource: JRDataSource jrDataMoviment...
asked by 05.05.2016 / 23:32
1
answer

Open JFrame in maximized Java

I'm having a problem, I'm creating a JFrame and I want it to open maximized. I'm using the following code: frame.setExtendedState(Frame.MAXIMIZED_BOTH); frame.setLocationRelativeTo(null); The size of the JFrame is maximized, but the button...
asked by 01.05.2016 / 17:11
1
answer

Exception in thread "main" java.lang.UnsupportedOperationException

Predicate is a functional interface that allows you to test objects of a given type. Given Predicate , removeIf will remove all elements which return true for this predicate. When trying to use the removeIf() method...
asked by 30.03.2016 / 18:39
1
answer

What happens after the wait synchronization?

See these two codes on separate threads Thread A synchronized(objeto) { while(condicao) objeto.wait(); //operações } Thread B synchronized(objeto) { condicao = false; objeto.notify(); //operações } Will o...
asked by 06.03.2017 / 14:55
1
answer

Public Type (VB) for Java

I have a project that runs in vb and I have to move to Java, in a certain part I have the structure declarations. My question is: What is the best way to do this in Java without loss of performance? The files I have to read are large and will...
asked by 09.03.2017 / 18:46
1
answer

Create a BufferedImage from an int Array

I have a one-dimensional array that contains the colors of an image, where each interval of 3 positions is represented by the color of a pixel (R, G, B): int[] cores = {255, 0, 0, 0, 255, 0, 0, 0, 255}; In this array I would have 3 pixels,...
asked by 13.03.2017 / 00:16