Questions tagged as 'java'

2
answers

Java Desktop Application Root Directory

I have a java desktop application, being an executable jar and I need to know the root directory where the jar is running. I have researched several ways and I have not found what I need, I am always seeing models where I inform an X file so it...
asked by 23.03.2016 / 14:04
1
answer

How to eliminate extra space formed in a LinearLayout when creating ImageView via code?

I'm using this code to create an ImageView and add it to a LinearLayout : public void inserindoImage(ImageView image,int rid,LinearLayout linear ) { LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.Layo...
asked by 24.03.2016 / 16:59
2
answers

Message when the user is exiting the application

I know I can use AlertDialog for this, but without creating a button, only when the user is pressing the back to exit does an alert appear? Type, when it comes out (this involves the Android system in the part that does it alone) would a...
asked by 24.12.2015 / 00:48
1
answer

Implementation of priority queue using vector

I'm implementing a priority queue using a vector, so my insert method works normally: public boolean inserir(int n){ if(estaCheia()) { return false; } if(estaVazia()) { fila[nItens++] = n; return true; } else { int i;...
asked by 21.12.2015 / 00:36
1
answer

Convert Java + WindowBuilder project to Android or Web

Good afternoon, Would you be able to convert my Java + Windowbuilder project to Android or Web devices? I saw that it is possible to convert Java to Maven but another question is ... What would happen to JFrames? Thank you!     
asked by 10.12.2015 / 16:40
1
answer

Validate jFormattedTextField with Mask

I'm using jFormattedTextField with Mascara but I do not know how to validate if the entire field has been populated. jFormattedTextField // CPF JLabel lblCpf = new JLabel("CPF"); contentPane.add(lblCpf, "cell 0 10");...
asked by 09.12.2015 / 12:43
1
answer

How do I choose the right scope for a bean?

From what I've been studying, I know there are several scopes for beans: @RequestScoped @ViewScoped @FlowScoped @SessionScoped @ApplicationScoped What is the function of each? How should I correctly choose the scope of my bean?     
asked by 13.11.2015 / 15:09
2
answers

How can I order a LinkedList?

So as I said in the title I need to sort a LinkedList of an object and these objects as a sort parameter. Follow the code: public LinkedList getOrderOfActivityCompletion() { LinkedList<Activity> activityOrder = new Lin...
asked by 14.11.2015 / 20:53
1
answer

Binary for Hex

I'm developing a server that accepts socket connections. However, the information received is binary and strange characters appear during printing. IthinktheconversionorthewayIreadthedataisnotverycorrect(nottosaytotallywrong).Belowthecodesof...
asked by 16.11.2015 / 20:02
1
answer

Dynamic graphical interface after MySQL request

People are as follows, I want to load all this data in my graphical interface, the idea is for the user to type the cpf (primary key) of it and after that is loaded all that data for him to update, I want to know how do I that this cpf after the...
asked by 24.02.2016 / 19:14