Questions tagged as 'java'

1
answer

How to make or put a button in my app as the one on the home screen that slides [closed]

I need to place a button similar to the one on the home screen that slides with your finger to unlock the mobiles. I refer specifically to this:     
asked by 30.05.2016 / 22:27
4
answers

Store a Java Date value in MySQL

I'm trying to store a java.util.Date value that contains a date and time together in a MySQL record. I've tried this: java.util.Date d = new java.util.Date(); plantilla = new SimpleDateFormat("dd/MM/yyyy H:mm"); String tiempo = planti...
asked by 22.05.2016 / 11:39
2
answers

Error showing BD data in Java

I have the following: Home public Principal() { tabla = new DefaultTableModel(null, getColumnas()); setFilas(); initComponents(); } private String[] getColumnas(){ String columna[]= new String[]{"...
asked by 01.12.2016 / 01:25
2
answers

Loop to insert id not repeated in an ArrayList

This method basically checks whether an id is repeated and throws an error. But it has an error: when entering a repeated id, I have more opportunities (ask for a new idea and the entry), but if I re-enter it again, it passes as true. Does...
asked by 06.07.2017 / 12:13
1
answer

Browse ArrayList with different java objects

I have a class Avisos of which two types of ads inherit. I save them all in an ArrayList and I could not access the getters of one of the children ads. I need to get ads of type AvisosLimpiar on a certain date and I am using the...
asked by 20.07.2017 / 01:56
1
answer

Type that has the name of the class

I found the following Java class: public class MiClase { int informacion; MiClase siguiente; public MiClase(int valor) { informacion = valor; siguiente = null; } } There are native types in Java such as int...
asked by 03.01.2019 / 21:56
2
answers

Variable accessible from the whole app

Is there any way to have a variable and that it can be accessible from the whole app? Not only from the activity that I am in.     
asked by 11.12.2018 / 18:45
1
answer

Error in a List

Family my app closes when it reaches the 2 line of code: private MyDataBase dataBase = new MyDataBase(context); private List<Nota> itemsImportantes =dataBase.getAllDataImportantes(); The LogCat tells me NullPointExeption on that...
asked by 23.11.2018 / 04:07
1
answer

State File Accountant

I have the doubt of how to know the partial counting of the documents in a directory while using Files.walk, because if the directory contains more than one million files and it takes 10 minutes to post everything, I want to know every 1 min for...
asked by 20.12.2018 / 14:53
3
answers

How to make all the complete information come out in a JTable

I would like to know how to do all the complete information in a JTable that I created in a JScrollPane. I created the header with the DefaultTableModel code. Thanks. DefaultTableModel mMedico=new DefaultTableModel(); mMedico.addColumn("...
asked by 19.07.2016 / 20:20