Questions tagged as 'java'

2
answers

Running program in the background

How to run a program in the background, and when the user presses a key does the program do something? I can only do with the program in focus.     
asked by 19.01.2015 / 00:06
1
answer

Photo taken by the camera returns inverted

Is there any way I can not invert the photo after updating it in an ImageView? For example, the application I'm developing accesses the device's camera and after taking the picture, updates the ImageView with the photo reversed. I wanted to leav...
asked by 13.01.2015 / 13:43
1
answer

ClimaTempo API - Cities with accent give error

I have the following Endpoint where you get the name of the city and state in the URI: @RequestMapping(value= "/clima/{nomeCidade}/{ufCidade}/agora", method = {RequestMethod.GET, RequestMethod.OPTIONS} , produces="application/json" ) public R...
asked by 26.06.2018 / 21:08
1
answer

How to color specific lines of a JTable?

I'm developing a Java application that involves a JTable , I need to paint some red lines depending on the age and status of that line. I'm using a DefaultTableModel to populate my table. I do not know how to start. Could you...
asked by 06.02.2014 / 16:34
2
answers

How do I disable JVM hostnames?

An application is trying to access a remote EJB. Regardless of whether the configuration uses the servidor.empresa.com.br address or an IP to access the service, an error occurs: weblogic.utils.NestedError: This address was valid earlie...
asked by 13.12.2013 / 17:46
1
answer

How to change the value of a string in XML?

There is a way to change a value of a string in XML. I know how to get the value through getResource().getString(R.string.value); but I do not know how to change the value directly in XML. Is this allowed? Or are the values created in...
asked by 08.02.2014 / 00:15
2
answers

Fixed column of a JTable in a JScrollPane

How do I leave a column of a fixed JTable (without scroll) inside a JScrollPane? I want to leave the first column of a fixed table, the scroll bar will only scroll from the second column onwards, the first one should always be visible. I e...
asked by 29.01.2014 / 18:26
1
answer

How to work with environment variables?

I'm developing an application that works with files (save and load) and I have to work with system variables to determine where to save those files. My question is: Is there any way to use variables regardless of the operating system? If so,...
asked by 16.03.2015 / 14:19
1
answer

Error in logic control TV - Java

I'm a beginner in java and I'm having a hard time making the btnVolumeUp button increase the counter. First I have this TV class in which I created the methods. public class Televisor { int canal = 0; int volume = 0; boolean ligar =...
asked by 20.04.2015 / 20:57
1
answer

Separate content from the row in the BufferedReader loop

I have txt files with approximately 5,000 items, and these do not have a default, for example: 10 20 30 40 50 60 70 80 90 100 I need to import this to SQLite , each value being 1 register. Example: ID | VALOR 1 | 10 2 |...
asked by 26.04.2018 / 21:26