Questions tagged as 'java'

3
answers

Problem with hibernate entities

I have a problem with hibernate that tells me that entities are not mapped. Here is the error: INFO: HHH000397: Using ASTQueryTranslatorFactory Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.Q...
asked by 22.10.2018 / 01:28
1
answer

NavigationBar background color

I have the following NavigationView <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="330dp" android:layout_height="match_parent" android:layout_gravity="st...
asked by 09.05.2018 / 19:45
2
answers

Change Background Color of a JLabel by pressing a JButton from another window

I would like to know how to change the background color (setBackground) of a JLabel by pressing a button from another window. (JLabel in class Window1) lblLuzC = new JLabel(""); lblLuzC.setOpaque(true); lblLuzC.setBackground(Color.RED); lbl...
asked by 25.05.2018 / 02:17
1
answer

Does the Collection.shuffle () method serve to clutter lists only?

I created a set: Set<Integer> bombo1 = new LinkedHashSet<>(); And I want to mess up the whole. The problem is that I do not know how. I've tried with: Collections.shuffle(bombo1); but only serves to sort lis...
asked by 07.03.2018 / 00:56
2
answers

Search for a word within the Java Files variable

I have the following code in java I would need to search the result returned the name of a specific file, the problem is that this way I search by extension and not by the name and I can not think of how to perform a search by name . I hope you...
asked by 09.03.2018 / 19:26
1
answer

How to move folders with files inside them in Java?

I have the following dilemma. By day I have X number of folders in a directory that need to be moved to another directory and then make a backup of those files. I am creating a Java program to automate the process but I have problems when moving...
asked by 07.08.2018 / 20:32
1
answer

Failed to display data list in Java

In the following method: generateFile (String filename, String country) Generate a text file that contains the list of offices in the last country as the second parameter. The file must have the last name as the first parameter. The fiel...
asked by 09.08.2018 / 22:41
1
answer

Hibernate object problem!

Good morning, everyone! I have a problem with the objects in Hibernate. This is the method I use to extract the object: public Moto loadMotoId(SessionFactory SessionBuilder, int idMoto) { Session conexion = SessionBuilder.openSession();...
asked by 01.02.2018 / 17:16
1
answer

Collect parameters in session JEE

I have a small application where the first thing that appears is a login form. Where if the user correctly enters the data access to the menu page where you can save some records in the database. The problem is that I am not saving the session c...
asked by 26.02.2018 / 17:26
1
answer

Browse Objects Array with Jquery

My problem is this, I have an array of colored objects and it is as follows:  [Color [id = 1, CodeColor = Red], Color [id = 2, CodeColor = Green]] And I need to go through that array of colors through the jquery library and paint it in an option...
asked by 25.02.2018 / 16:11