Questions tagged as 'java'

1
answer

Multiple layouts in one activity - how to use it?

As in this section: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.addcontact); imageButton01 = (ImageButton) findViewById(R.id.imageButton1); imageButto...
asked by 14.03.2014 / 12:29
1
answer

Error with super (this) when invoking a constructor in Java

Is this allowed? public Produto(Context context) { super(context, this); } You're giving me an error:    Can not refer to 'this' nor 'super' while explicitly invoking a constructor I'm trying to make a simple MVC for when I ty...
asked by 01.04.2014 / 16:20
1
answer

Java, convert floating-point Hexadecimal value

I'm developing an application that receives data from a GPS card, data is received by bluetooth in hexadecimal, latitude and longitude values are 64-bit floating points, which follows the IEEE 754 standard. I can already capture the hexadecim...
asked by 03.02.2017 / 17:54
1
answer

Convert String Ex. 1,520,30 to a BigDecimal using the Spring MVC @InitBinder

I have a screen where I work with jQuery Mask monetary value masks, when the user performs the submit form value returned to my controller is Ex :. 1.340,34. The Bean attribute that bind bind is a BigDecimal . Soon I had to create...
asked by 29.07.2015 / 15:57
1
answer

Redirect to another page only if the user is authenticated

I have a login screen where I authenticate a user, however when I put a action to change the page independently whether the user was authenticated or not the page is opened. My question is to know where I have to check whether the user...
asked by 10.06.2015 / 18:54
1
answer

How do I get an image of the computer inside a java application?

I have a registration and in this register I would like the user to choose an image to represent him. Otherwise, a default image would appear. That is, in a certain part of the registry would have a button that when clicked open the Windows m...
asked by 26.06.2015 / 06:25
2
answers

Point function in the calculator (broken numbers)

I've created a calculator with Swing and awt.event, and I have three questions! First question: To create the calculator I used the import with import.javax.swing. * and java.awt.event. *, when I use *, I am using all the contents of the...
asked by 14.04.2014 / 22:27
3
answers

Serialize XML to REST API with Correct Accentuation

I'm creating a small REST read-only API service on a client's system. It uses Spring MVC to fulfill requests and the purpose of each request is to return a JSON with certain information to another system I am writing. To generate JSON, I'm us...
asked by 14.05.2014 / 09:20
2
answers

How to close a JDialog after finishing executing a Thread?

I have a configuration window that opens on the first run of the application I'm developing. After typing the directories that the application will run the user clicks save, some tests are run and finally a Thread runs. I would like to have t...
asked by 15.04.2014 / 18:51
1
answer

Common predecessor in a commits graph

I bumped into an interesting problem again during an interview. Unfortunately I am also not sure that I found an optimal (or good enough) algorithm. I thought about sharing to see if anyone knows a classic solution or a more efficient variation...
asked by 26.05.2014 / 03:26