Questions tagged as 'java'

1
answer

How to compress the contents of a directory in a zip?

Hello everyone. I have asked this question so that you could give me a hand in the obstacle that has been presented to me on my way. My problem My problem is that I want to be able to compress the data or the contents of a folder i...
asked by 12.02.2017 / 20:39
3
answers

Java: error when calling JPanel from JFrame

I have a class that inherits from JFrame and the view is shown, in the view I have a button where I call another class that inherits from JPanel but the new view does not open, I hope and you can help me.    JFrame import javax.swing.*; im...
asked by 06.02.2017 / 21:42
1
answer

Enter names in java [duplicate]

I'm doing a program that captures names and grades, you can enter how many grades you want but you should not have scored more than 10. However my program is not letting you enter the name of the student. What is the error? import java.io.*;...
asked by 09.02.2017 / 15:38
1
answer

How to fix a spinner that does not show well on android

I have a problem with two spinners that are not shown correctly, in the interface, in the simulator the last two spinners are shown with a smaller font than the first one that says It's a Workshop, and testing in real devices in some cases the s...
asked by 12.02.2017 / 21:55
1
answer

Current date in DatePickerDialog

When I open my DataPickerDialog I get the wrong date, exactly 9/8/21, how can I make it default by today? However in my EditText by default the date of today's date comes out. My code: public class Main2Activity extends AppCom...
asked by 16.02.2017 / 23:01
1
answer

Send image to the server with MultipartEntityBuilder and HttpURLConnection

I am trying to send an image to the server using HttpUrlConnection and MultipartEntityBuilder. The problem is that when I execute the background function, to send it and get as a response a String that says on the part of the server that has bee...
asked by 15.02.2017 / 19:40
1
answer

aapt.exe finished with non-zero exit value 1 Android Studio

I updated my Android Studio from version 2.3.3 to version 3.1. He gave me several problems that I solved. However, there is one that has been impossible for me. The error says like this: Process 'command 'C:\Users\User\AppData\Local\Android\Sd...
asked by 29.01.2018 / 19:25
3
answers

Store a sub-list of objects

I have a question about how to make a partition of an Object List. What I want is that I have a List with 1000 objects and I want to create a sublist to have 500 objects on one side and another 500 on the other. I have an object class called...
asked by 30.08.2017 / 17:09
3
answers

How to append objects with ObjectOutputStream without deleting file content?

The question is that, I do not attach the created objects to those already contained in the file, but I overwrite them ... Does anyone know how to solve it? I leave you the code that does the function of saving the objects. public static void...
asked by 24.01.2017 / 12:20
1
answer

How to select by default an element of a jcombobox that is loaded from a class?

I have a jcombobox that loads the regions of Chile, I use a class called Regions to also save the ID. I need to consult the data of a person to load the jcombobox (which does it without problems), but I also need to select the region of the pers...
asked by 13.01.2017 / 06:49