32,204 Topics
| |
How to change this applet to swing? [CODE]import java.applet.Applet; import java.awt.*; import java.io.PrintStream; public class Hounds extends Applet { public String getAppletInfo() { return "Hare and Hounds"; } public String[][] getParameterInfo() { return parameterInfo; } public void init() { String s = getParameter("bgColor"); try { BG_COLOR = s != null … | |
How to listen for key presses that are not on a focused window Ok, so my problem is I have a tray application written in java and I want to apply some user configurable hotkeys. User presses F10 for instance and something happens... I started to google for key loggers … | |
I'm a computer graduate, working on java programming since an year.I'm just writing programs all the time and didnot get a chance to implement any of the engineering practices that I have studied at college. Now I've got a month free time and tell me some interesting things I could … | |
[CODE] package com.ibm.compbio; public abstract class DynamicProgramming { private Cell prevCell; private int score; private int row; private int col; protected String sequence1; protected String sequence2; protected Cell[][] scoreTable; protected boolean tableIsFilledIn; protected boolean isInitialized; public Cell(int row, int col) { this.row = row; this.col = col; } /** * … | |
[CODE]package ATM; // ATM.java import javax.swing.*; public class ATM { private boolean userAuthenticated; // user authentication private int currentAccountNumber; // current account number private Screen screen; // JOptionPane (pop-up(s)) private CashDispenser cashDispenser; // virtual cash dispenser private DepositSlot depositSlot; // virtual deposit slot private BankDatabase bankDatabase; // account database private … | |
class C{ public static void main(String a[]) { int i1=9; int i2; if(i1>3) { i2=8; } System.out.println(i2); }} | |
Hi all, I am using Java Servlets with XML and XSLt, I am getting the values from text area in XSL , the value is using Escape method in Javascript. The code is Like [code] src = frm.txtFeedBackDsc.value; src=rtrim(src,' '); src=ltrim(src,''); dest= escape(src); frm.hsFeedbackDsc.value=dest;[/code] And the Value is stored in … | |
i need some project topics in image processing and image compression to do my final projects send me some list plaese.... | |
I'm trying to write a program that prints out the largest and smallest of four numbers that are inputted using a JOptionpane, but I cannot figure out how to sort out the integers with if and if else statements. Anyone have any advise? | |
Ok, I'm new to java and I need a little help with this if statement. Or possibly a different approach on how to write it. The if statement first needs to determine what type of package the user has so they may be charged a base fee. (Package A, B … | |
Ok, I'm having the hardest time writing this code for work. Any suggestions on how to get me going in the right direction on this code would be great!!! Project: I need to make uninstalled fonts available for viewing for my co-workers. Therefore, I'm to write a code that can … | |
PLEASE HELP. Hi I get the following error when I compile my java code and I have been trying to resolve this for past 4 hours without a solution. Java code import java.util.*; /**********************/ /* Class Subscriber */ /**********************/ public class Subscriber implements Runnable { String phoneNumber; String name; Integer … | |
this is my test data : {5,1,3,6,1}, {4,1,3,3,2}, {6,2,1,4,1}, {5,1,4,1,3}, {4,2,1,5,2} i want it to be output like this : 5,4,1,6,1,3,5,2,3,6,4,1,1,3,1,2,4,4,2,1,… this is my coding : [CODE] public int[] linear45(int[][] A){ int[] l = new int[A.length * A[0].length]; for(int i=0; i <3; i++) { for(int j= 0; j <= i; … | |
hi, i am getting below error plz help java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at com.kotak.autoblocknb.transaction.Transaction.main(Transaction.java:38) [code]ArrayList<Integer> db2Crns=new ArrayList<Integer>(); ArrayList<Integer> oracleCrns=new ArrayList<Integer>(); ArrayList<Integer> leftOverCrns=new ArrayList<Integer>(); db2Crns=testDB2Connect.getDb2LoggedInCrns(); oracleCrns=testOracleConnection.getDataFromPartyAuditInfo(); for(int i=0;i<db2Crns.size();i++) { int x=db2Crns.get(i).intValue(); int y=oracleCrns.get(i).intValue(); if(x!=y) { leftOverCrns.add(db2Crns.get(i)); leftOverCrns.add(oracleCrns.get(i)); } else if(x==y) { leftOverCrns.add(oracleCrns.get(i)); } } int lastIndexOfOne=db2Crns.size(); for(int i=lastIndexOfOne;i<oracleCrns.size();i++) … | |
I am doing my final year of undergraduation and I need a java simulator that simulates a parking lot. Can anybody provide me with a simulator or suggest a open source simulator? I have no backgroung in building simulators. Is it easy? If I had to build a simulator on … | |
how to read 25 digit number in java???? i want to write a porgram to perform addditon and substraction between 25 digit numbers | |
i wanaa compare 2 array list and find the uncommon data in 3rd arry list i have written below code ArrayList db2Crns=new ArrayList(); ArrayList oracleCrns=new ArrayList(); ArrayList leftOverCrns=new ArrayList(); db2Crns=testDB2Connect.getDb2LoggedInCrns(); oracleCrns=testOracleConnection.getDataFromPartyAuditInfo(); int array1Size = db2Crns.size(); int array2Size = oracleCrns.size(); System.out.println(db2Crns.size()); System.out.println(oracleCrns.size()); for(int i=0;i<oracleCrns.size();i++) { String val=oracleCrns.get(i).toString(); int k=0; for(int j=0;j<db2Crns.size();j++) … | |
Hi.. I'd like to learn java.. Can anybody give me a link for online study or link for pdf or ppt??? If so, you will b thankful.. | |
i am final year mca. i need to do mini project on java. please suggest me some ideas | |
how can i print an array element using [COLOR="red"]showMessageDialog[/COLOR] [CODE] for(int k=0; k<aSiz; k++){ JOptionPane.showMessageDialog(null,"New Array is \n"+array[k]); }[/CODE] i dont want "New Array is" to be repeated...... tell me fast..... | |
i know i need to post properly using (code) (block codes),, this is my understanding of that rule if i'm wrong pls teach me, i will abide. thank you I have been trying to get this code right for 4 days, i am losing hope. i know you'll understand me. … | |
hi, i am new for java programing world. can you help me for above thread. | |
this is my whole code hi NOrmR1 would you give me a hand mate please [CODE] import java.util.*; class Property { private String ID; private String description; private String location; private double weeklyRR; private char status ; private boolean visibility; public Property (String pID, String pDesc, String pLOc, double weeklyR … | |
Hi All, I need help. I want to make a background processing program. The idea is, the program will start in start up and every about 10 seconds the screen will pop up something. I wrote the code below. The program is starting when simulator begin. In console the timer … | |
Hello all, how can I pass some input from Java ti C++ using sockets. The input is only two int numbers. Any help with the sockets, please. I'm new but I need them. | |
How is dialog box control used in net beans java?i know how to get it but not how to display some text or message in it. Please help. | |
Hi , I want to get a String from command line argument and add the values. [code] class Sample { public static void main(String args[])throws IOException { String Given_Id=args[0];//Getting input int Add=0;; int Store=0; System.out.println("The length of the String is "+Given_Id.length());//Calculating length for(int i=1;i<Given_Id.length();i++) { Add=Given_Id.charAt(i); Store=Store+Add;//Adding values } System.out.println("The … | |
Whats wrong with my program? class Hw7{ public static void main (String args[]){ String s = "Hello"; int v = String s; System.out.println(v); } } This is the error thats brought up: --------------------Configuration: <Default>-------------------- C:\Users\Stephane\Documents\JCreator Programs\Hw7.java:5: ';' expected int v = String s; ^ C:\Users\Stephane\Documents\JCreator Programs\Hw7.java:5: not a statement int … | |
Here is my code, i am getting the following error message. How do i handle it? [code]package simp; import java.io.*; public class fCase { public static void main(String [] args) throws IOException { BufferedReader readObject = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter your expressions here"); String userEntry = readObject.readLine(); String [] toki … | |
i have alot of forms , when i press in button that's open the other form in new one how i can make it open in the same form & not open it in new one |
The End.