Questions tagged as 'java'

1
answer

Change the line color of a dataTable

I'm using JAVA, JPA, PrimeFaces, I have a dataTable that summarizes a stock. I want to color the rows of the table if the value checks for the minimum of each product, I do not know how to proceed, MY VIEW <h:panelGrid style="margin-top:...
asked by 14.10.2016 / 20:52
2
answers

How to round the doubles values returned by Interface Location

I have a ArrayList that stores GPS coordinate objects and their elements are always compared to the double values returned by the getLatitude() and getLongitude() methods of Interface . Problem From the tests I've done...
asked by 16.10.2016 / 18:31
1
answer

In-app connections

I am trying to make my application make an emergency call and call a pre-defined emergency number, but when I open Activity it simply to have already looked and refiled the code 3 times, but the error persists, it presents the following e...
asked by 11.09.2016 / 07:07
1
answer

Problem with login using sqlite

My method is not returning the teacher logged in. public Professor autenticarUsuario(String usuario, String senha) { String SQL = "select * from PROFESSOR where USUARIO = ? and SENHA = ? "; String[] selectionArgs = new String[] {...
asked by 09.09.2016 / 04:27
1
answer

Call activity after the thread is executed

I have an app that logs in to a teacher in a webservice and after logging in, it inserts the user into the android database. If the result is other than null, I want it to call the activity menu. But my application is closing. Follow the code....
asked by 08.09.2016 / 18:36
2
answers

Doubt in the implementation of ActionListener

I have a college project to make a system of any category which in the case I chose a medical system and had something I did not quite understand about what the implementation would be like: I have a JInternalFrame called CadastroMedi...
asked by 10.09.2016 / 15:52
1
answer

Darcula look and feel in the application

Hello, I use NetBeans with the Darcula LAF graphical plugin to program Java. This plugin leaves a dark, very nice design. On the JFrame edit screen the look and feel is inherited: ButifIcompileitgetsthelookandfeelthatIusuallyputviacode(UIManage...
asked by 12.08.2016 / 20:24
1
answer

Problems in Java project with CDI (Weld) + Hibernate + PrimeFaces

Good evening. I'm having trouble executing my project with the structure described in the title of this post. I am using Hibernate, with Transaction Control by Server (JTA). Follow the classes in my project. Bean that is referenced in the xht...
asked by 12.08.2016 / 05:38
2
answers

How to return the number of entities in a table using JPA and the COUNT function?

I'm using the EclipseLink implementation and I can not resolve the following query that should be wrong: Query query = em.createQuery("SELECT e , COUNT(*) FROM Empregado e"); Integer resultado = (Integer) query.getSingleResult(); M...
asked by 10.08.2016 / 19:21
2
answers

Use method changes java

How do I make change in the database using the method changes in a ClassAlertFoundation. Do I use the gets and sets of the template to change the data? Do I need to use the SearchId (int id) method to return an object? //pesquisa pelo id e ret...
asked by 17.08.2016 / 21:17