Questions tagged as 'java'

2
answers

SlideShow with images from URLs

I was developing a slideshow uploading images from URLs I found a library developed by a Russian, the Universal Image Loader , but this slideshow will be used in the app in the tablet version. In the mobile version I use a listview ....
asked by 30.01.2014 / 18:00
1
answer

Is it possible to access a shared variable with another thread with no concurrency problem?

I have this code List<Object> myList = new ArrayList<>(); public void RunOperation(){ myThread = new Thread() { @Override public void run() { for (int i = 0; i < ReallyHighNumber; i++) {...
asked by 23.12.2018 / 00:54
1
answer

How to expose a method as a bean to use the spring dependency injection

I need to expose a method as a bean in Spring% with% to use it in the injection of an attribute, which has more than one implementation. What I did was the following: I added the method that will create my object using the ApplicationCon...
asked by 28.05.2018 / 17:12
2
answers

GET request is not answered correctly by the backend

The project is an Angular 6 front end, which connects to a Java back-end for communication with a SQL Server BD. The server that receives the file .war , containing the back as the front, is Tomcat 8.5.32. The structure for logging i...
asked by 17.08.2018 / 18:19
2
answers

Alternative to create a new method on a String object?

I have the following situation: I have a txt file of defined positions (type CSV, CNAB, etc.) to process and extract values. For purposes of understanding, follow the code I've made and it's working perfectly: public class Extract { final...
asked by 17.03.2015 / 16:18
5
answers

Capture name of files in directory

The following method takes the name of the files of a certain directory and displays them on the screen, the problem is that .listfiles() returns the number of bytes and not the number of files, although it shows the files name just havin...
asked by 26.02.2016 / 16:33
4
answers

Print arraylist information on the screen

I have ArrayList but I can not print the data on the screen. Follow class: public class Cachorro { private String Raca; private String cor; private String nome; private String nome_dono; private int idade;...
asked by 09.12.2016 / 19:15
0
answers

Add checkbox to a JTree

I have already looked at quite a few examples out there of JTree s with checkboxes but it seems all very complex to me. Does anyone know a simple way, if any, to add a JTree that I dragged into my frame, a checkbox on each of th...
asked by 02.12.2014 / 13:20
2
answers

Error generating files / classes from a Web Service with Netbeans

I'm trying to generate files / class from a Web Service and bring it to my Java project. For this I am using Netbeans IDE 8.0.2 At first I'm getting the message "Uma classe/interface com o mesmo nome já está sendo usada. Use a personali...
asked by 13.01.2015 / 20:21
2
answers

What is a hook method?

I'm studying some design patterns and I came across this method, but its concept was not clear to me. What does the method do and what is the relationship between it and the Template Method? I would like an example in java. Excerpt that I did n...
asked by 23.02.2016 / 17:50