Questions tagged as 'java'

1
answer

NullPointerException when using setText for a TextView in the fragment

I'm creating a fragment where I have in one part the map and in another a Retrofit object, where I get the date and time of a server. The error occurs inside the onResponse call of Retrofit, where I try to set the TextView with the date and time...
asked by 16.04.2018 / 16:41
1
answer

Method remove () does not remove object from ArrayList

I have a question to remove an object from a list in a job. I have an automotive class: public class Automovel { String marca; String modelo; String preco; Automovel(String marca, String modelo, String preco) { thi...
asked by 15.04.2018 / 15:47
1
answer

Error trying to open map with disabled location

So far, the purpose of this application is to open the user to locate some mapped points. When the app opens (location off or not), it asks if the user allows it to use its location. It goes in permissions, activates the location and, until then...
asked by 16.04.2018 / 02:38
1
answer

Detect overlapping figures after dragging with the mouse

I drew four pictures with Graphics 2D (two large triangles and two medium triangles), two fixed (1 medium triangle and 1 large triangle) and 2 for movement (1 medium triangle and 1 large triangle). When you move the picture, you need to detec...
asked by 16.04.2018 / 17:24
1
answer

Execute function with ENTER in EditText

I need to perform a function with the "Enter" keyboard in EditText . They did not work: android:maxLines="1" : it skips fields android:imeOptions="actionNext" : it executes with the "next" button of the virtual keybo...
asked by 16.04.2018 / 19:36
2
answers

Datatable of primefaces does not update selection variable

Based on the first example of Datatable Selection where a variable (% with% ) I get the selected value when I click on a linhaSelec I decided to mount my implementation but the variable that would have the value of the selected line is...
asked by 25.04.2018 / 20:59
1
answer

JasperReports dynamic printing

I'm trying to make an impression with JasperReports , when compiling the report I get the following error:    Exception in thread "main"   net.sf.jasperreports.engine.design.JRValidationException: Report   design not valid:      1. T...
asked by 04.04.2018 / 19:42
1
answer

How to use the AS operator with the Library Room?

I'm not able to retrieve the variable total , how do I? @Query("SELECT SUM(item_valor) AS total FROM Itens WHERE total =>:data") Itens getMes(String data); The IDE warns syntax error in the WHERE clause's total variable. My Enti...
asked by 05.05.2018 / 17:24
1
answer

How do I package a Spring Boot application with maven without running the tests?

I'm developing an application with Spring Boot and every time I run the command mvn package it runs my unit tests. However, my tests do not raise the server with the application to run the tests on it, because the database is not on my ma...
asked by 28.03.2018 / 16:43
1
answer

Error No suitable driver found when connecting with javaDB

I created a database using the javadb netbeans derby, then created a connection on port 1527 with the name of the Bank being TEST. I created the connection string below that I should connect to the TEST Bank, but with the code below I can not co...
asked by 22.03.2018 / 20:47