Questions tagged as 'java'

1
answer

JAVA - Problem with the IF ELSE conditional when using the value of a STRING

The code is very simple. I just have to get the type of 'storage' that an article has. This can be from the 'deposit' or from the 'shelves / gondolas'. When obtaining that registry, I proceed to carry out a different process of each one. The pro...
asked by 15.12.2018 / 16:09
2
answers

Spaces in query SEARCH_ACTIONS Android

How do I add spaces to the query field with SEARCH_ACTION in android? Example: IT WORKS: adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query "enviar" <nombre_paquete> IT DOES NOT WORK adb shell am start -...
asked by 10.12.2018 / 20:28
1
answer

Error javax.swing.JFrame can not be cast to screenPrincipal

I'm trying to pass data from one screen to another and I get the following error, I do not know how to fix it. Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JFrame cannot be cast to pantallaPrincipal Except...
asked by 09.12.2018 / 21:20
1
answer

Close activities Android studio

I have an app with a side menu. The doubt I have that every time I use one of the menu options opens a new window. } else if (id == R.id.cine) { Intent intent = new Intent(this.getApplication(), Cine.class); startActivityForR...
asked by 27.12.2018 / 15:58
2
answers

JSON RECORD IT

I have this JSON { "id":2, "group_id":1, "default_billing":"2", "default_shipping":"2", "created_at":"2018-10-03 16:12:55", "updated_at":"2018-10-03 16:13:00", "created_in":"Default Store View", "email":"henryar...
asked by 06.12.2018 / 18:18
3
answers

change of value of textView depending on the selection of a spinner

The problem is the following, in the activity I have a textView and a spinner what I'm looking for is that when you select an option in spinner the value of textView change. This is the code public class longitud...
asked by 16.04.2017 / 16:09
2
answers

consume web service echo in java with angle 2? [closed]

Good I am beginning with the web service, create one in java, which I want to connect with angular2, but it throws me an error.     
asked by 15.04.2017 / 01:03
2
answers

Problem loading image

I have an application, that when I ran it from the IDE, I load an image with a progress bar from the main screen. The problem is that when you exported the file to an executable, the image disappears but the progress bar keeps appearing. And I d...
asked by 18.04.2017 / 22:24
2
answers

Remove the comma in a double. Android studio

The thing is that I do calculations with decimals so I use "double" to store the quantities. And even if the number is whole without decimals, it always shows me the .0. That is, if the result is 40, it marks me 40.0 Is there a way to remove...
asked by 14.04.2017 / 14:36
2
answers

Create TreeSet object from one HashSet

The code: public class FooFoo { public static void main(String[] args) { Set set = new HashSet<>(); set.add("hola"); set.add(2.3); set.add(4.2F); set.add(1); TreeSet set2 = new...
asked by 27.11.2018 / 12:41