Questions tagged as 'java'

1
answer

Effect on edge of a JButton component

How do I create a smooth (fade) transition from the border of a JButton when hovering the mouse? My code looks like this: @Override public void mouseEntered(MouseEvent e) { Object temp = e.getSource(); if (temp instanceof JButton)...
asked by 26.04.2014 / 01:27
1
answer

Send and receive image via WebService

I'm developing an app where I need to convert an image to JSON and send it to a WebService. Afterwards I will need to perform the inverse path, that is, receive a JSON image from a WebService and present it to the application user. Well, to s...
asked by 20.05.2014 / 06:41
6
answers

Check if a String contains two words

I have a problem with this exercise here: Write a class that does data validation ( Validacao ), with a method to validate a proper name ( ehNomeValido(nome) ). The method should return true if it passes the following rules...
asked by 02.07.2018 / 22:10
6
answers

Doubt about logical operators && e || in Java

I have the following code in my application: if (aquaName != null && !aquaName.getText().toString().isEmpty()){ values.put(NAME_COLUMN, aquaName.getText().toString().trim()); } else { Toast.makeText(this, "Name cannot be empty"...
asked by 01.06.2018 / 14:02
0
answers

Create Tables with Hibernate [closed]

Good afternoon !! I'm new to Hibernate and I've been trying for two days to implement table creation with it, I've already done several tutorials, but it does not work. Can anyone help me? hibernate.cfg.xml <?xml version="1.0" en...
asked by 09.07.2016 / 17:54
2
answers

Installation blocked when debugging app by Android Studio

When trying to debug or install an application that I'm developing, the following message appears on the device where the APK is being installed. Locked installation. This app contains code created to circumvent Android security protect...
asked by 12.07.2016 / 10:39
2
answers

Cut bi-directional relationship looping

I'm having a Spring project, using JPA and Liquibase, I have a two-way relationship between two entities, I wonder if anyone has a solution to the infinite referral problem between the two? For example, I have a Question that has many answers, a...
asked by 10.06.2016 / 13:45
3
answers

Button does not execute the ManagedBean method

When I click on the change or delete buttons, the ManagedBean methods are not executed. Does anyone have any ideas? Is there any configuration on the buttons? Project: link UsuarioListaAtivos.xhtml <ui:composition template...
asked by 03.09.2015 / 03:33
3
answers

Why does the code print 0 instead of 5?

Why does this code print 0 instead of 5 ? class B { private int b; public int getB() { return b; } public void setB(int b) { b=b; } } class A { public static void main (String[] args) { B b = new B();...
asked by 21.02.2017 / 01:44
4
answers

How to return 2 variables from a function

I'm accessing a webservice , which returns: listProdutos[] - > List of all products or null when there are no products When I lose access for some reason, it throws an exception, and in that case I need to return a second...
asked by 05.11.2014 / 17:59