Questions tagged as 'java'

1
answer

How to add an ImageView in a RelativeLayout in runtimer?

How do I add a ImageView at run time to LinearLayout or even TableLayout ?     
asked by 11.10.2014 / 16:10
1
answer

Passing String between classes

I have my main class where I have ... String ola="Hello little friends"; And I have my other class: public class NotificacaoDiaria extends BroadcastReceiver { @Override public void onReceive(Context arg0, Intent arg1) { T...
asked by 13.09.2014 / 06:00
1
answer

Is there any way to display a txt file without JFileChooser?

Is there any way to display a txt file without JFileChooser? For example by writing the .txt file location and connecting directly to JTextArea     
asked by 29.10.2014 / 12:00
1
answer

Use of bitmapped images in an application

As an experiment to develop a more advanced application, I was trying to make an application that consisted of a button and a imageView component, so that when I pressed the button a% bitmap that I have stored on my phone. However af...
asked by 29.10.2014 / 23:12
1
answer

Change of entity to reflect on related entities

I have two entities, for example: Obs: Code fiction to facilitate understanding of the problem. @Entity public class Celular{ @Id @GeneratedValue(strategy= GenerationType.IDENTITY) private int id; private String modelo;...
asked by 03.09.2014 / 23:15
1
answer

Application migration error, ANTLR and Wildfly incompatibility 8

I have a legacy application developed in Java web, and would like to put it in a new production environment. In this environment is installed Java 8 and the latest version of Wildfly. Today this application runs on a Java 7 server in Glassfish (...
asked by 04.09.2014 / 19:22
1
answer

Uploading files using REST and Java

I'm creating an application and need a way to upload xls / xlsx files, sending the front-end (Ajax) file to the backend (Java) so it can be manipulated. Ajax code: $("#formulario").submit(function () { var formData = new For...
asked by 14.07.2014 / 22:36
1
answer

How to put a global shortcut to restart debug mode servers in Eclipse?

How can I configure Eclipse (I'm currently using Kepler) so that when I press a keyboard shortcut, for example, F12, the Tomcat server starts or restarts in Debug mode? I was able to make the F12 shortcut work, but I had to configure it for...
asked by 11.06.2014 / 20:56
1
answer

How to test the creation of an obj and method call in a servlet?

I am trying to create a web application using TDD, however, I am having a question about how to test the Servlet that processes the requests and calls the proper logic, I do not know how to do assert . @Test public void deveCriarInstacia...
asked by 11.06.2014 / 15:49
1
answer

How to create ListView with SQLite data in Fragment

How do I insert the SQLite data into this listview of my code: @Override public void onActivityCreated(Bundle savedInstanceState) { String[] sCheeseStrings = {"Emerson","Simone","Samara"}; super.onActivityCreated(savedInsta...
asked by 10.06.2014 / 01:27