32,204 Topics

Member Avatar for
Member Avatar for NickMalone85

I'm just playing around with some code and I can't figure out why this isn't working. It's only "encrypting" one word. Can anyone tell me what's wrong with it? [code = java] import java.util.*; public class EncrypterDriver { static String encrypt(String fileMessage) { String encryptedMessage = ""; char fileChar = …

Member Avatar for Ezzaral
0
92
Member Avatar for bduitp

Hi, I hope this is the right place to post this topic. I'm building an imagealbum application. Registred users can visit certain parts of the album after authentication. So, the usermanagement and authentication process are build as servlets in Tomcat using a jdbcrealm. As the images are uploaded directly thru …

0
48
Member Avatar for chickenchaser

im designing a 12 hour clock, converting it from a 24 hour clock. i had the idea of keeping the clock internally as 24 hours, and externally showing it as a 12 hour clock. The code I have is public String getTime() { if (hours.getValue() >12) { hours.setValue(hours.getValue() - 12); …

Member Avatar for Ezzaral
0
111
Member Avatar for sid99

Hi, I am quite new to regular expression and I am kinda stuck on this question. I am using a book which explains it only in short detail. I have an answer but am not sure if I got it right. If someone can please check it and post the …

Member Avatar for sid99
0
85
Member Avatar for Karkalash

Hi: I have to write a program that uses methods and arrays. I have to create a method that creates an array and populates it with 10 random numbers between 1 and 10 inclusive. Then I have to write another method that sorts the number from lowest to highest and …

Member Avatar for Karkalash
0
137
Member Avatar for luxmi_gee

I want create some custom controls. With the properties. can any one help me to develop that. which is use to develop custom controls, jsp or ejb or swings?

Member Avatar for mukulbhave
0
92
Member Avatar for abdulraqeeb33

hello, i have written a program which selects each record in the database-table(having ip,status and other fields) pings to that ip and if a reply is obtained then the program establishes a socket conn b/w another comp and exchanges information,if info is exhanged then nothing is to be done to …

Member Avatar for mukulbhave
0
136
Member Avatar for alpe gulay

.,what is the best tutorial to know on how to insert an audio in my java program... -any advice is highly appreciated... alpe:)

Member Avatar for mukulbhave
0
85
Member Avatar for roryne

Does anybody know if it is possible to keep a thread running that constantly checks for new processes being ran on the computer?

Member Avatar for mukulbhave
0
57
Member Avatar for warjas816

I'm trying to write a file that first decides if a number entered is prime or not, then if it is writes it to a file. Here's what I've got, but I keep coming up with a couple errors that I can't figure out how to fix. One is that …

Member Avatar for javaAddict
0
85
Member Avatar for ceyesuma

I have the tutorial running with a entire database displayed. I am working with the tutorial at: [url]http://www.netbeans.org/kb/articles/mysql.html[/url] The above tutorial creates a jDesktopAPP. with components bound to the table. I am trying to add a button (basically). I am in the process of understanding binding. the program loads with …

Member Avatar for ceyesuma
0
172
Member Avatar for abdulraqeeb33

i have a program running with lot of system.out.println statements.. i want to display this in a javaframe...can anyone tel me the steps to go abt it

Member Avatar for alpe gulay
0
126
Member Avatar for tyczj

i am some what new to java so i am not really familiar with all the errors and such but i am getting one that says this: [CODE]Exception in thread "main" java.lang.ClassCastException: lab8ab.EmployeeAryApplicEx cannot be cast to lab8ab.EmployeeMultiTypeSeqFileExer at lab8ab.EmployeeMultiTypeOpenListener.<init>(EmployeeMultiTypeOpenListener.java:22) at lab8ab.EmployeeAryApplicEx.<init>(EmployeeAryApplicEx.java:115) at lab8ab.EmployeeAryApplicEx.main(EmployeeAryApplicEx.java:43)[/CODE] what does that mean? the program …

Member Avatar for tyczj
0
109
Member Avatar for NycNessyness

Hello everyone. I had a quick question. How can I go about setting constraitnts for a JTextField. I'm trying to not allow users to enter any non numeric numbers, except for dollar signs, commas and periods. Also how can I restrict a JTextField to only allowing two numbers to be …

Member Avatar for NycNessyness
0
376
Member Avatar for parthiban

Hi all , I'm trying to display currency in Indian format but I'm getting question marks symbols instead of digits . Please tell me how to sort out this problem . Thanks in advance

Member Avatar for jwenting
0
73
Member Avatar for shaqnolysis

Am working on a project to develop a database which should output to my mobile.Is there anyone who know any site which have resources for the database connectivity to the mobile?I will appreciate your help. Shaqnolysis

Member Avatar for peter_budo
0
91
Member Avatar for George2

Hello everyone, I want to use javax.comm to do serial cable communication on Linux platform. Currently, I can not find enough learning materials (tutorials and samples) from searching the net. Could anyone help to recommend some good ones? thanks in advance, George

Member Avatar for jwenting
0
225
Member Avatar for chandana sri

how can we retrieve an employee or any persons database values when we enter that particular persons input values though a login html page ,using servlets

0
65
Member Avatar for TheWhite

[code=java] import java.awt.Color; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.SwingUtilities; public class Testing extends JFrame { public static void main(String[] args){ SwingUtilities.invokeLater(new Runnable() { public void run(){ new Testing(); } }); } private Testing(){ super("tester"); launch(); } private void launch(){ setBounds(200, 200, 300, 300); setDefaultCloseOperation(EXIT_ON_CLOSE); JPanel topPanel = new …

Member Avatar for TheWhite
0
3K
Member Avatar for ceyesuma

I am working with the tutorial at: [url]http://www.netbeans.org/kb/articles/mysql.html[/url] Is there someone able to assist me in learning how to add a search functionality to the above tutorial? right now I am deciding if I need to transform th code (below) to the @Action,actionPerformed(),and class extending (@Action) Task. [code] public void …

Member Avatar for ceyesuma
0
151
Member Avatar for omarelmasry

I am a C++ programmer, but i am required to prepare a presentaion about Generics in Java I need someone to explain this function: public static <T> T do_something(T [ ] list) { … } Please show what every part indicates; <T> indicates: ..... T indicates : ..... ...... and …

Member Avatar for omarelmasry
0
94
Member Avatar for WalkmanXD

I wrote a program to implement LinkedList : package JavaApplication; import JavaApplication.MyExciption; public class LinkedList<ListElementType> { class Node { ListElementType elem; Node next; } private Node head; private Node tail; private Node current; public LinkedList() { head=null; tail=null; current=null; } public void insert(ListElementType elem)throws MyExciption { Node addedNode=new Node(); if(addedNode==null) …

Member Avatar for peter_budo
0
137
Member Avatar for Raghavansat

Hi I have written a script file which uses whiptail --inputbox to get an input and i want to execute this script from a java program... my java code is [code] Process process = Runtime.getRuntime().exec("/path/../myscript.sh"); [/code] but when i run my java code the script is not running. The whiptail …

0
62
Member Avatar for Raghavansat

Hi I have written a script file which uses whiptail --inputbox to get an input and i want to execute this script from a java program... my java code is [code] Process process = Runtime.getRuntime().exec("/path/../myscript.sh"); [/code] but when i run my java code the script is not running. The whiptail …

0
61
Member Avatar for ceyesuma

I am working with the tutorial at: http://www.netbeans.org/kb/articles/mysql.html can any one help me figure out why I can not set a query with this method? entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory ("splashbookdbPU").createEntityManager(); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance (splashtemplateda.SplashTemplateDAApp.class).getContext().getResourceMap (SplashTemplateDAView.class); query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery (resourceMap.getString("query.query")); // NOI18N list …

0
84
Member Avatar for wujianwei
Member Avatar for javaAddict
0
95
Member Avatar for kimbostun

I want to Define class name MutiItemSale that represents a sale of multiple items of type Sale. The class MutiItemSale that have instance variable whose type is Sale[], which will be used as a partially filled array. There will also anther instance variable of type int that keep track of …

Member Avatar for javaAddict
0
102
Member Avatar for Ryano24

These are the only answers I could not find can anyone help me out please public class TestA { public static void main( String args[] ) { int x = 2, y = 20, counter = 0; for ( int j = y % x; j < 100; j += …

Member Avatar for TheWhite
0
213
Member Avatar for NAMAN JAIN

most oftenly u have said or heard the word JAVA BUT I WANT U TO EXPLAIN WHAT ACTUALLY JAVA IS I AM EAGER TO KNOW PLEASE NO SMART ANSWERS ANSWERS FROM PRO

Member Avatar for jwenting
0
101
Member Avatar for Relegant

With these codes [CODE]public boolean rogue() { if(rogue = true) { playerEquipment[playerHat]=5554; // set armor playerEquipment[playerCape]=6570; playerEquipment[playerAmulet]=6585; playerEquipment[playerChest]=1; playerEquipment[playerShield]=1; playerEquipment[playerLegs]=5555; playerEquipment[playerHands]=5556; playerEquipment[playerFeet]=5557; playerEquipment[playerRing]=1; playerEquipment[playerArrows]=1; playerEquipment[playerWeapon]=1; } } public booletan hunter() { if(hunter = true) { playerEquipment[playerHat]=1038; // set armor playerEquipment[playerCape]=6570; playerEquipment[playerAmulet]=6585; playerEquipment[playerChest]=-1; playerEquipment[playerShield]=-1; playerEquipment[playerLegs]=-1; playerEquipment[playerHands]=7462; playerEquipment[playerFeet]=-1; playerEquipment[playerRing]=6735; playerEquipment[playerArrows]=-1; playerEquipment[playerWeapon]=4151; } …

Member Avatar for jasimp
0
102

The End.