32,199 Topics
| |
Hi, I have created the following code to get connection object to Database(MySql in my case) using a static method. I wanna know whether it is a good practice or not? Will there be any problem like concurrent access? Any information will be helpful. public static Connection connection(){ Connection conn … | |
I'm a 'JMenu Expert' or w/e, but I've used JMenus a few times before and have gotten them to do what I needed them to do... However, I am trying to do a new thing, and I'm not actually sure it's possible in java (maybe in Xcode) I am using … | |
Hello everyone, I'm new to java and I'm working on a assignment, but I couldn't compile the BookTest.java. Here's my Book.java package question_1; public class Book { private String title; // Title of the book private String author; // Author of book : private String isbn; // International Standard Book … | |
Hey guys, i need help with this assignment. I am a complete beginner in java programming so i don't know how to get started in this thing. For this project, i am suppose to search for a specified word within a block of text. The word, the size of the … | |
hi! I am designing a 2d game, in my game i want to add a feature e.g. in my jframe i have three images if a user clicks on a image that image will automatically get set as a background throughout the three laves (in my game they are three … | |
| I need to input multiple files from directory but how to do it for any file name? If I do not know the file name So I can pass one by one file to thread? int 1 = 0; while(true) { String name = "Lab3File"+i+".dat"; File file = new File(name); … |
| How to take any bumner of arguments form command line and to search in arraylist> I now do it in with defined number of arguments and take every argument and search, but this is unlcear to me? Thanks |
please tel me the logic behind the code for find the common aphabets between two words?? ex ... mine mind common letters are : m i n like | |
Hello! I need some help dealing with this error: java.lang.ArrayIndexOutOfBoundsException: 16 at com.lameguard.crypt.LamePacket.writeB(LamePacket.java:40) at com.lameguard.LameGuard.assembleAnswer(LameGuard.java:445) at l2ft.gameserver.network.l2.c2s.ProtocolVersion.runImpl(ProtocolVersion.java:94) at l2ft.gameserver.network.l2.c2s.L2GameClientPacket.run(L2GameClientPacket.java:50) at l2ft.commons.net.nio.impl.MMOExecutableQueue.run(MMOExecutableQueue.java:38) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) What could be causing this? Any suggestions are welcome! Thanks | |
I am a student and am pretty new with java. I'm trying to write a basic pacman applet for a class my problem is i have the code written to draw the maze and the pacman but when i run the applet all I am getting is the black background … | |
while configuring workspace in Eclipse, applet is not loading i am using jdk1.5 and Tomcat 5.5 but when iam try to open same application in IT link applet is loading sucessuflly (i have used the same code to configure locally) can any one please let me know how to resolve … | |
Hi! I'm working with a huge software system with a lot of people being involved in the coding through many years. I'm noticing more and more that there is a lot of bad code, especially get methods here and there with huge side effects, which you totally not expect. So … | |
Hello! I'm trying to find the RPG color code of the default button? does anyone know? | |
I created a function that saves a file with a custom extention ".nra" however each time that i enter a file name, it throws ArrayIndexOutOfBoundsException public static void SaveFileNra() throws Exception { if(gl.DataStack.isEmpty()) { System.out.println("There is nothing to save!\n"); Menu(); } else { System.out.print("Enter the directory you wish to save … | |
ok, so if i want to increment soemthing to "2.4," how would i do that? This is what i have: While (something == D) { total+=2.4; } Would this be correct? | |
Hi there, when calling a method from another class I get the following error message: ** Exception in thread "main" java.lang.NullPointerException at TextAnalyser.main(TextAnalyser.java:23) ** My two classes: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.lang.String.*; import java.util.*; public class TextAnalyser { static Tokeniser aTokeniser; public TextAnalyser(Tokeniser aTokeniser) { } public … | |
Hey guys I need help with in my code... I need to add a method that checks wheather the weather attributes are consistant or not. thanks for the help heres my code... import javax.swing.JOptionPane; public class Week_eight_number_31 { private int DefaultFarenheit = 70; private String DefaultSky = "Sunny"; public Week_eight_number_31 … | |
Hey all, I have been wanting to make a cool game in jave such as a fighting game starting off simple with drwing stick figures :). But i was wondering why there are so many java games created in Japplet why not use swing- i know there are games out … | |
Hello problem i am having is when trying to multiply polynomial 1 by polynomial 2 polynomial 1 gets mutliplied by the first term in polynomial 2 and not by each term in polynomial 2. Below is my code: ~~~~ /********************************************************************************************* * Multiplies Polynomial 1 to Polynomial 2 * The method … | |
So the program I'm writing should count how many of each individual vowel is in the program and then print that. I'm basically stuck with while and conditional statements. I think my if statement is where I've gone wrong. I'm not sure how to have it read the letter properly … | |
> Quoted Text Here Hi, anyone can help pass values of JRadioButton to another JFrame? For example, if "twoway" Jradiobutton is selected, its value (a char i.e. "2-way face foundation") will be shown in another JFrame. Thanks in advanced.. Code blocks are created by indenting at least 4 spaces ... … | |
i have a single list program which i need to sort the nodes of int and String type unsing only one of these algorithms (insertion, selection, bubble and shell). no merge or quick or using collections and stuff. i'm having a difficulty here, i only know how to implement them … | |
To make it short and sweet, here it is. Looking to do a simple screenshot on the client-side (and if anyone would be so kind, point me in the direction to create an automated upload of the screen to a server. ++ if you can provide a tip on doing … | |
I have everything added to the JFrame using absolute positioning. It works fine but when it repaints the pie chart it also repaints the last JNumericField and button at the the very top left of the screen. At postion 0, 0 I presume PieChartFrame.java import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; … | |
I am working on a java application that will display an image and play a sound. It finds the current month and displays the appropriate information. Below is the code that I have been testing (that's why santa is in april) it will not work when trying to play wav … | |
I have Oracle 8i installed in my PC And i Installed NetBeans7.0rc2 with glassfish server It shows an error that the glassfish server cannot be started SEVERE: Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@187955b i want to chnage the default port number 8080 … | |
java have any default function to use UPGMA.like Math.pow(x,2) | |
How can i find the Euclidean distance of 2D matrix in java.is it possible like Math.pow(x,2) | |
Is as way test out swing components without having to rely on Thread.sleep() to make sure that the components have realized completely. This problem with this approach is that it becomes difficult to guess how long it would take for components to realize under different environments of execution like vnc … | |
Hey all, I'm working on a login screen and have an MSAccess database that stores the userName and password. I am currently using JtextField and String to access the username and password located in the MSAccess database, but now I want to hide the password when it is being typed … |
The End.