Questions tagged as 'java'

2
answers

Store transparent image indexed in a BufferedImage

Please I need to know how I can create a BufferedImage that stores a transparent image with color% co_of% of 256x256 pixels. Please, if someone can enlighten me with this doubt, I would really appreciate it. Greetings.     
asked by 01.08.2017 / 17:35
2
answers

Index out of range when performing an update

When executing the statement: ps.setString(i ,text[i].getText()); I get the following error:    java.sql.SQLException Parameter index out of range (1 > number of   parameters, which is 0); This is the code: void Guardar (JTabl...
asked by 02.08.2017 / 00:14
0
answers

How is Java inheritance used? in the extends option I have an error to inherit another object

class CarroToyota extends carroBMW { public CarroToyota () { modelo= "Toyota"; } } The upper part says that it is correct but at the moment of importing another class it says that I have an error in ca.modelo: import pa...
asked by 06.08.2017 / 22:36
1
answer

Problem 3 in line in java

I'm doing a tic-tac-toe in java, but when in a line there are 3 equal figures, it does not tell you that you won, as if it did not fit the condition, for now just check in horizontal line to try, but do not why not check the winner public Tres...
asked by 06.08.2017 / 17:36
0
answers

Manipulate activity items from Fragment

How can I manipulate the items in the Navigation Drawer Toolbar from a fragment that is inside the Drawer's activity, so that it shows and hides the icons ?? I work on Android with java.     
asked by 06.08.2017 / 21:06
0
answers

Convert SQL Native to JPQL

I have this query select distinct p.nombre, p.total, p.clie_id from(select cli.nombre as nombre, cli.clie_id, cue.cuen_id as cuenta, count(cue.clie_id) over(partition by cli.clie_id) as total...
asked by 06.08.2017 / 19:59
0
answers

How do I get out of this Thread?

This code is like a chronometer that counts up to 10, the problem is that after it no longer allows me to continue entering text with System.out.println or anything, if it does not finish running the complete code, how can I exit? of the? publ...
asked by 23.07.2017 / 23:48
0
answers

Event in a button of each Item of a Firebase Recycler Adapter

I have a RecyclerView loaded from Firebase data, I need to add a functionality to a button that is in each item, which is to add a product to the shopping cart. The problem that I have happens when there is more than one item in the re...
asked by 23.07.2017 / 20:08
1
answer

How can I convert a String to Image?

I take an Image from the database but I can not because it says that I can not convert from String to Image public static Pet showImage (Pet show) { String sql; java.sql.ResultSet rs; try { sql = "Select imagenMascota...
asked by 24.08.2017 / 02:12
1
answer

Convert java code to c #

Good morning. I have had a desktop application in java to convert it to WPF (c #). I do not know much about java but intuiting what it does, little by little I have managed to translate it except for a block of code. The code is as follows:...
asked by 24.08.2017 / 15:22