Questions tagged as 'java'

1
answer

How to request the Exception in thread error "AWT-EventQueue-0" java.lang.NullPointerException [duplicate]

package vista; import Modelo.Conexion; import Objetos.Usuario; import controladores.UsuariosController; import java.awt.HeadlessException; import java.sql.SQLException; import javax.swing.JOptionPane; import org.apache.commons.codec.d...
asked by 06.03.2018 / 02:28
1
answer

How to display the contents of a list that comes with numeric fields in String in java?

I have the following list, and I pass a find, which returns a list of Access Registry private List<RegistroAcceso> listRegistroAcceso; listRegistroAcceso = registroAccesoService.findRegistroAccesoByNuserid(cvePersona); Within t...
asked by 15.03.2018 / 22:46
0
answers

show local page from another app on android

I have an html project inside the assets folder, I can show the page from a webview, but the object is to be able to show that page also from another browser installed on the devices, for example " link " instead of file: ///android_asset/index....
asked by 15.03.2018 / 19:14
1
answer

Insert an int data in postgresql from java

I am developing a billing program, I need to insert a data type int but I get an error this is the line: Item ite = new Item(); ite.setPrecio(txt_precio.getText());     
asked by 07.03.2018 / 08:06
1
answer

Edit a csv file in java

I need to edit csv files but the available packages I have seen to manipulate these files (com.opencsv and javacsv) do not edit based on the current state of the file, but always rewrite it. This code shows in a simplified way what I want to do:...
asked by 12.03.2018 / 10:36
0
answers

soundpool.stop does not work

I'm trying to make the sound stop ringing when the user stops pressing (lift your finger) but it does not work, the sound goes on ... Negra3.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View...
asked by 07.03.2018 / 00:53
0
answers

how to share data between classes inherited from abstract in java?

Good to see if you can help me. I have an application with the crud generator that uses an abstract class and its inherited classes. My problem is that I can not share data between a managed bean and legacy classes. I tried to create the clsases...
asked by 03.03.2018 / 00:04
2
answers

How to correctly create new File using the correct path?

Trying to create a "FILE" in Android Studio with a path always responds " false " when using the method myfile.exists (). How can I get the path or Uri to create it correctly? since I add it in different ways but apparently it always turns...
asked by 03.03.2018 / 04:54
1
answer

startActivityForResult from an adapter and receive the data in the fragment

I have the following: MainActivity Fragment1 with recylerview SimpleAdapter Des of the RecyclerView.Adapter when doing click send a Intent with startActivityForResult ((Activity) mContext).startActivityForResult...
asked by 06.03.2018 / 12:34
0
answers

Question about matrix in java

I need to do this exercise Perform a Program that allows filling a square matrix of NxN and obtaining the following values: 1) Main and secondary diagonal 2) Sum of elements in each row 3) Value of an element in position X (row) an...
asked by 06.03.2018 / 03:09