Questions tagged as 'java'

2
answers

Array is not showing the data that should be there

Class Interface : switch(opcao) { case 1: Usuario umUsuario = new Usuario(); umUsuario.criarUsuario(); break; case 2 : System.out.println("Busca de usuario"); System.out.println("Forneça o cpf do usuario");...
asked by 09.11.2018 / 19:38
1
answer

scanf / gets equivalent to java

I've searched around and found this package br.com.treinaweb.parte2; import java.util.Scanner;/*essa linha*/ public class fluxo { public static void main(String[] args) { Scanner leitor = new Scanner(System.in);/*essa linha*/...
asked by 22.07.2014 / 18:12
2
answers

App Closes when I'm going to test

I am a beginner and already in my first tutorial I have this error I made the whole process as it is in the video tutorial, and when I try to test it on my phone, it compiles, installs, opens and closes the application. I looked everywhere...
asked by 28.10.2018 / 16:05
1
answer

Unable to instantiate activity ComponentInfo; java.lang.IllegalStateException: System services not available to Activities before onCreate ()

I have a project of a chat socket running in Swing and now I'm passing it to Android. It was all working perfectly until I put the code that makes the magic happen. The application closed and I did not know why it had already fixed all the er...
asked by 26.10.2018 / 02:50
3
answers

JComboBox update from another JComboBox

My idea was to make a JComboBox whose values were updated according to the options of the previous ComboBox. I'm using multiple ArrayLists. For example, a ComboBox with the option of January and February ... If you choose January in the fi...
asked by 17.06.2014 / 11:06
1
answer

How to know which image was clicked in java

I have 4 images in my layout, how do I know which one was clicked and do conditionals? my escript: OnCreate: ImageView bancada_tv = (ImageView)findViewById(R.id.main_bancada); ImageView aguarda_tv = (ImageView)findViewById(R.id.main_aguarda...
asked by 18.06.2014 / 00:55
2
answers

How do I get data from a node inside another node in Firebase with android?

Ineedtogetthedataofthenode"usrCategoriaUsuario" that is in the tb_user. The normal data I get, but this usrCategoryUsuario, I can not get. Code that looks up User data in Firebase: DatabaseReference fb = ConfiguracaoFirebase.getFirebase()....
asked by 12.10.2018 / 01:12
2
answers

Recover Spinner position to use in another Spinner of another Acitivity

I have a note registration activity that has 1 spinner. In this Spinner contains card registration with IDCartão, title and description (Except in a "Card" table in the database). When you save this record from Notes in the "Notes" table, only t...
asked by 20.12.2018 / 01:07
1
answer

HttpResponse java

How to handle the json response from the server? HttpResponse responsePOST = client.execute(post); String responseBody = EntityUtils.toString(responsePOST.getEntity()); The String "responseBody" comes from php so {"product":[{"id":"21...
asked by 29.08.2014 / 05:14
1
answer

The JSF AutoComplete component does not work

IhaveanapplicationthatmustenterSocialReason,CNPJandcity,boththeSocialReasonandCPNJfieldsareworkingnormally,howeverthefieldthathastoenterthecityisgivingthiserror.Ago26,20141:23:30PMorg.apache.catalina.core.AprLifecycleListenerinitINFORMAÇÕES:TheA...
asked by 26.08.2014 / 18:31