Questions tagged as 'java'

1
answer

Create a method to Replace Characters in a String

Can someone help me create a method that overrides the characters of a String? For example, String nova = antiga.replace('a','1'); This only replaces a letter. I wanted to create a method for all the other letters of the alphabet that I...
asked by 22.08.2017 / 19:47
1
answer

Jtable currency format

I'm making a coin-shaped CellRender. I put 13 columns in a jtable, one has the recipes (Salary, 13th salary, Extra hour) .. and outas 12 with the months. every month the person will type this information and then I will add another jtable with t...
asked by 13.09.2017 / 16:59
1
answer

java.lang.StackOverflowError: stack size 1038KB

I'm doing an algorithm that converts a bitmap leaving it in shades of gray. I was able to do it using for but I would like to do it recursively. Using for (This is working fine) //BUTTON - ON CLICK . . . public void go(View v){ //...
asked by 14.09.2017 / 00:53
1
answer

Is it possible to simplify the Runnable command in an Android function?

I've created a class to make it easier to use Dialogs, and I'd like to know if you can simplify it even further. My Class looks like this: public class FVRDialog { private Activity act; private Context context; private AlertDial...
asked by 18.04.2018 / 08:42
1
answer

Retrofit: Could not locate ResponseBody converter for

I'm working on a system and I need Retrofit2 (with Spring Boot) but I'm not getting it. The source and error follow. @JsonIgnoreProperties({"codibge", "codestado"}) public class CEP { private String cep; private String logradouro; priva...
asked by 16.04.2018 / 04:05
1
answer

Increase / Decrease SeekBar progress with Button action?

Someone can help: How to increase and decrease seekBarHomem's progress through Button action? @OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);tv_QtdHomem=(Tex...
asked by 22.09.2017 / 07:32
1
answer

Dynamically fill fields according to JSP CEP Javascript

I want that when I type my zip and click the search button, it returns the data of the public place, state, neighborhood and uf but clicking on the search button it is not calling the function that searches the data of a webService of the mail....
asked by 20.09.2017 / 20:57
1
answer

Set cursor focus position in EditText

Is there any way when I call the virtual keyboard ( SoftKeyboard ) set the cursor position? I have a EditText that already is filled by default the number 10 , when the keyboard starts I want the cursor to be just after...
asked by 25.09.2017 / 19:03
1
answer

Fibonacci question in Java

I have an issue and its resolution, which needs to be with while or do-while . But I did not understand the resolution, could anyone explain? I will comment on the specific doubt of each line.    The Fibonacci Sequence is a seque...
asked by 09.11.2017 / 20:18
3
answers

Toast with specific duration

How to put this Toast to last only a few seconds? For example, 10 seconds. if (mEmail.equals(email) && mPassword.equals(password)) { Intent intent = new Intent(LoginActivity.this, MainActivity2.class);...
asked by 31.05.2017 / 20:13