java

java

  • All Sites

0 answers

Keyboard non swing textfield interpreter

I was wondering if there is already code that interprets the ascii values that are pressed (on keyboard) and converts them to their designated letters. Since holding shift and pressing "1" gives "!". ...

2 answers

.setImage usage help Java

im totally new to the language and i am trying to understand how ImageIcon works fully. I have a method within a sub-class and i want to return an ImageIcon based on a switch statement. The only ...

2 answers | 51 secs ago by Bean Shares on Stack Overflow stackoverflow.com
0 answers

JSOUP Submitting a POST to a form

I'm currently working on my programming skills by doing a application for a website. For now I can sign in to the webpage trough the application. My focus now is to let the user change his/her's ...

0 answers

Android animation on SurfaceView

I would like to make my player blink. For the animation to take place, I've prepared a few pictures of each frame of the action. I am trying to do this by updating the image with a delay for each ...

1 answer

How to view and edit infinispan cache data remotely

I have configured infinispan cache embedded with wildfly8.2 server . For that I added the below entry in my standalone.xml <cache-container name="mycache" default-cache="cachedb"> ...

0 answers

how to get values from one excel database that do not match with the values in other database in java?

I have two excel databases. first one is database: Sl_no Species State District Local_equation General_equation Specific_gravity 1 Cassia fistula ...

1 answer

Trying to prevent numbers repeating (Java/NetBeans)

I'm a student learning Java (and working with NetBeans at school). We are trying to do a simple Bingo program (bingo boards with 15 numbers in them that aren't repeated) for (int i = 0; i < 3; ...

0 answers

Arduino-Processing Serial.send/Serial.get interaction

I'm trying to get my Arduino environment to send data to processing for a data visualization project. I have managed to get the handshake working and can Serial.println(...) to print the data I need ...

2 answers

remove digits from the output jsoup

I've made this simple code to extract the ID of some players... but, don't need the whole output i need the last 4 digits, this is my code import java.io.IOException; import java.util.logging.Level; ...

0 answers

How do you convert a JLabel to a Button in Java?

I have a JLabel with ImageIcons of t-shirts. I want to make each t-shirt have the ability to be clicked and then it will lead to another window. How can I make each t-shirt a button while maintaining ...

1 answer

Concern with Facebook's login decoding sign_request performance

I am completely new to the Facebook API. I would like to incorporate Facebook login into my application. I am using the Javascript SDK on the front-end to log the user in and retrieve the user_id and ...

1 answer

Suffix tree implemenation in java

I was trying to solve the problem where given a larger string and an array/list of smaller string, we need to make the determination whether the larger string contains each of the smaller strings. I ...

0 answers

HTML5 and Java server application deployment on AWS

I have created a Java restful server application which can be compiled as a JAR/WAR file and I have another front-end application built using knockoutjs and HTML5 which talks to the Restful Server ...

0 answers

Efficiently updating listitems of a displayed list in a list fragment by background threads

I have a ListFragment and a custom ArrayAdapter and I pass to the adapter an arraylist of custom objects and are displayed in my list fragment. All ok so far. For each element in my list (i.e. in my ...

0 answers

Android Radar beam

How do I draw an radar beam with canvas.drawLine which turns clockwise 360°? Any suggestions, tutorials and hints are welcome! Thank you! Jasper

0 answers

Code seems to stop xml layout from showing in Android Studio

The problem is that I have an Android app that doesn't seem to show the xml layout when I put this while loop into the class file. The loop is as follows: while(!clicked){ ...

0 answers

jsp session valid or not showing html content

I am trying to create session on this jsp page with my servlet. Session is working properly but the problem is that whether the session is valid or not the page is showing the html content. I want to ...

2 answers

Can't run TCP client/server code on using cmd

I have this code but it doesn't run on cmd using windows. Doing this for the first time. When I try to run the server, there is no response (no error, but can't continue typing and nothing happens, ...

2 answers | 10 mins ago by Jules on Stack Overflow stackoverflow.com
4 answers

How to compile rhino/javascript files to .class bytecode for java at runtime

I'm making a falling sand game in Java. I want users to be able to write their own engine for it using a simpler language. Falling sand games can be very CPU intensive so I want to have the engine ...

1 answer

Why won't my sine method work

I'm a beginner programmer and new to stackoverflow. So i have been making a Math Formula Solver and I have 4 formulas up and functioning. I am working on my Sine formula solver and it won't work. I ...

1 answers | 12 mins ago by Skyrimjob on Stack Overflow stackoverflow.com
3 answers

How to use replaceAll() to replace arithmetic(i.e 0+1)

so I'm currently working on a program and for part of it I need to replace AND/OR evaluations that are strings. Things like 1+0 meaning 1 OR 0. However when I try to use replaceAll("1+0", "1") it ...

3 answers | 13 mins ago by tb93 on Stack Overflow stackoverflow.com
4 answers

Merging two XML files into one XML file using Java

I am stuck with how to proceed with combining two different XML files(which has the same structure). When I was doing some research on it, people say that XML parsers like DOM or StAX will have to be ...

4 answers | 16 mins ago by dmurali on Stack Overflow stackoverflow.com
5 answers

Should we declare a public constructor when the class is declared as package private?

I think in this case there is no need to declare a public constructor since the class is not accessible outside the package anyway. But is there some hidden impact when the class has only package ...

5 answers | 16 mins ago by m_pGladiator on Stack Overflow stackoverflow.com
12 answers

Generate Java classes from .XSD files…?

I have a gigantic QuickBooks SDK .XSD schema file which defines XML requests/responses that I can send/receive from QuickBooks. I'd like to be able to easily generate Java classes from these .XSD ...

5 answers

Access a variable from another class in java

I have a class like this: MainActivity.java public class MainActivity extends FragmentActivity { /* I removed other methods */ public Map<String, Conversation> conversationsMap = ...

5 answers | 18 mins ago by Okan on Stack Overflow stackoverflow.com
0 answers

ResourceBundle change locale

Is there a way to change language using ResouceBundle when the app is already running? I don't really want to add Observers to every single label, so any global setting would be great. Thanks for any ...

1 answer

Getting the ServerSocket to know what data to listen for

I'm working on a simple client / server login system and I'm having trouble getting my server to listen for the right data being sent by the client. On my client I have methods sendRegistrationData() ...

0 answers

JavaFX on Eclipse

So I have JavaFX code that I know that works, but i'm not sure how to run it in Eclipse. Installed E(fx)clipse and I know that my java files work. When I try to run the file though it says editor does ...

0 answers

Error deploying WAR from Eclipse with a sample GWTP project

I created a simple GWTP project using the wizard - MyProject. Then I created file Beans.xml and placed in the META-INF. (The wizard didn't do this automatically, is this a necessary step?) I created ...

1 answer

Implementing classes that should behave as Optional

Imagine finding out if two shapes intersect. An intersection of two shapes may be either another shape, or nothing. I believe, the proper object-oriented solution would be: public final class ...

1 answers | 21 mins ago by Suseika on Code Review codereview.stackexchange.com
15 30 50 per page
1 2 3