Questions tagged as 'java'

1
answer

How to handle json in java

I'm trying to handle the following json: [{"code":"ARS","codein":"BRL","name":"Peso Argentino (R$)","high":"0.165","low":"0.1638","pctChange":"0.182","open":"0","bid":"0.1643","ask":"0.1647","varBid":"0.0003","timestamp":"1522699200000","creat...
asked by 03.04.2018 / 02:42
1
answer

Regular expressions do not match the desired text snippet

I'm needing my program to capture an item from a certain text, but it's not doing it, instead it's capturing everything that comes after that. Code that I'm using, eg: String html = "ItemPago12.569,00DeducoesPagas36.567,52ItensQnt6DeducoesR...
asked by 31.03.2018 / 23:22
2
answers

Call the method of a specific superclass

Suppose I have the following hierarchical structure in Java: First a class Avo : public class Avo { protected String nome; public void falar() { //Codigo aqui } } Then I have a class Pai that inherits fr...
asked by 18.04.2018 / 17:44
1
answer

How to put icon in tooltip?

I'm trying to print a text in a tooltip, and in the end, put an icon, however I'm not getting it, I tried doing with html. The problem is that the image comes "broken", does not appear. Whatwouldbetherightwaytodothis?importjava.awt.Dimens...
asked by 11.10.2017 / 00:39
1
answer

For does not scroll through the entire list

I have a problem scrolling through a list. My for looks like this: for (int i = 0; i < listaCaixaAbertos().size(); i++) { listaCaixaAbertos().get(i).setFechado(Boolean.TRUE); salvar(listaCaixaAbert...
asked by 01.02.2018 / 18:48
2
answers

Default value in Spinner + generated from bank

I have a spinner that pulls the values from the bank but would like to leave it with nothing selected or default value: public void spinnerClientes() { ControllerClientes ctClientes = new ControllerClientes(this); ArrayList<...
asked by 30.01.2018 / 10:52
1
answer

Correct writing in txt

I have a code snippet that writes in TXT, it works however it deletes what was written before, how do I make it not replace what was already written? Here's the snippet of code I'm using: public class TestandoEscrita { public static v...
asked by 16.10.2017 / 20:22
1
answer

Referencing main class variable in an @Override

We can reference a variable of the main class, for example within the method onCreate of the 2 forms (with or without this ): public class NovoRegistro extends AppCompatActivity { TextView data, horario; int dia, mes, ano; @O...
asked by 24.01.2018 / 19:42
1
answer

Is it possible to edit the name of a project?

Is it possible to change the name of an application after the project has already been created in Android Studio, by Manifest something like this?     
asked by 25.01.2018 / 14:43
2
answers

How to return a vector in another vector in Java?

I'm doing a program that applies slope uplift, but the value I need to compare to know if the previous one is better than the next one is a vector double My method to find the best value returns a double vector: public double[...
asked by 27.09.2017 / 01:21