Questions tagged as 'java'

1
answer

IndexOutOfBounds while populating an AbstractTableModel

I have a AbstractTableModel that has a List filled through a method that fetches the data in the database. The method that fills List has two overloads: one with no parameters (which fetches all data) and one with a search paramete...
asked by 20.05.2017 / 07:08
1
answer

Prime faces, play data from a dataTable to a dialog

screen contact <?xml version="1.0" encoding="utf-8" ?>                                                                                           <p:growl autoUpdate="true"/> <p:panel header="Formulário" id="panel">...
asked by 11.05.2017 / 16:39
1
answer

Serializing and deserializing attributes with names other than Json fields

I'm having the need to serialize and deserialize an attribute that your Json reference has a different name. For example, in the Json I am receiving there is a text field and I would like the value of this attribute to be filled in my att...
asked by 11.05.2017 / 15:24
1
answer

Comparing dates [duplicate]

My problem is that I'm not sure how to compare two dates. I would like to compare a date that the user types, compared to the current date. If the date is shorter than the current date, the deadline is due. If the date is equal or greate...
asked by 11.05.2017 / 20:10
1
answer

Environment for testing Android database

I'm developing a simple app with Android Studio, using Java as the language. Currently, I am implementing the login and logout routine and I have some doubts. 1) Do I need to use some local DBMS written in SQL to access locally registered users...
asked by 08.06.2017 / 15:07
1
answer

JSF problem in the Logoff method

Good evening I have the following problem, I have a JSF application and I need to make a logoff command, I did several and all gave the same result, it "kills" the user session (logs), but does not redirect to login screen (which is screen I...
asked by 08.06.2017 / 05:45
2
answers

Null object reference JAVA

The problem is all happening in a search, when I click and start typing the field it will filter the results, when I click on one of these results to open another screen, this error:    Attempt to invoke virtual method 'void android.widget.Te...
asked by 08.06.2017 / 14:03
1
answer

ListView Loses focus when returning

I have a list of Products, when I press the product number 50 for example I am redirected to the product details screen when pressing on return the list loses focus and back to the top, I wanted to know how to get the position of the item which...
asked by 09.06.2017 / 17:21
1
answer

I can not display the value received from the server

I'm working on a project written in Java with a Client-Server structure. My client is made up of Graphical Interfaces with Swing and the server working with multi-threads. But I'm at a point where I can not go through with it. There is an act...
asked by 08.06.2017 / 16:17
1
answer

Write the average of the numbers entered, if they are even. End the reading when the user enters zero (0)

Ex) Write an algorithm that calculates the average of the numbers entered by the user, if they are even. Finish reading if the user types zero. I did so: public static void main(String[] args){ Scanner x = new Scanner (System.in);...
asked by 04.06.2017 / 20:10