Questions tagged as 'java'

2
answers

How to save value asked with a scanner

Good morning I'm working with java for a class project and I have a question. I have a class named Modul and another one of class Alumne. In the Alumne class I have declared an Array attribute of type Modul: ArrayList <Modul> modul...
asked by 10.11.2016 / 11:35
2
answers

NullPointerException using WindowsBuilder and JFrame

I'm trying to do an exercise to learn how to use WindowsBuilder and JFrame and when I click on the button to do the calculations, I get the error:    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at GUI $ 2.actionP...
asked by 10.11.2016 / 20:42
0
answers

Run JNI on Ubuntu

Hi, I've been working on JNI with Windows but now I have to migrate all the tests I've done to ubuntu, can someone help me tell me what I'm doing? supposedly I have the steps to create the header with javac and javah but the part of Cde the dyna...
asked by 09.11.2016 / 17:28
2
answers

Problem with abstract classes

It turns out that I must create the game Ahorcado , then I applied all the code but it turns out that I want to generate random words, of course words already defined and grab everything in an array where with the class Math.Random()...
asked by 08.11.2016 / 22:59
1
answer

Help with fileupload in java ee 7 xhtml, get n files uploaded

I hope you can help me with this. I'm with a web app in java ee 7 primefaces like the view and the corresponding Beans. What I want is the following: By selecting a particular category, requirements are generated dynamically and next to...
asked by 28.10.2016 / 18:45
1
answer

How to recover part of compound data with JDBC?

I have a small application that connects with postgresql , it stores 2 objects, Equipment that has three values: store type String , range type String and finally price type int . To store them, I occupy a type co...
asked by 28.10.2016 / 11:29
0
answers

Implement a BottomBar without Fragments?

Let me explain, I have a BottomBar implemented with 5 Fragments, but it gives me a lot of problems, I can not do practically nothing, because each fragment is extended as Fragment , not as FragmentActivity . public class Mai...
asked by 27.10.2016 / 22:09
0
answers

Problems with Web Applications

There was a problem when trying out an application, and it is that when making a query it does not perform it and the worst thing that with other web apps nothing of this happens only with the mozilla. This is the function that invokes the contr...
asked by 19.12.2016 / 23:47
1
answer

JOptionPane.showConfirmDialog

protected void thisWindowClosing(WindowEvent e) { int n = JOptionPane.showConfirmDialog(e.getWindow() , "¿DESEA CERRAR EL PROGRAMA?", "Confirmación", JOptionPane.YES_NO_OPTION); if(n==JOptionPane.YES_OPTION) { JOpti...
asked by 27.10.2016 / 21:07
1
answer

How can I delete an object from a vector, and then rearrange the vector? [duplicate]

I need to delete an object from a vector, regardless of the position, and if the object leaves an empty space, the vector must be re-accommodated until the last empty space is left, this is what I have: public void remove(short pos){ boo...
asked by 22.10.2016 / 03:59