32,204 Topics

Member Avatar for
Member Avatar for murugavel84

Is there anyway to close the firefox using javascript without changing the about:config file?

0
79
Member Avatar for poisson

I learned some java in school just 4 weeks ago, so i do not know much things ... so requires your help!! [CODE] String[] alphabetArray = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", …

Member Avatar for igonzales
0
117
Member Avatar for adity

Hi, I have a Jtable created in swing of which one column contains check boxes. What i want is a few check boxes on specific rows.And now in the entire column Any help! :) Also i donot know the row number at which i want the check boxes.That needs to …

Member Avatar for leiger
0
115
Member Avatar for runningkuma

I've been rewriting a copy of the original Pokemon battle system in java. hered my current code: [CODE] private void opTurn(){ //Todo: opponents random attack does random damage, //misses, or causes a status effect //p.pause(005); wait(1) Action.setText("Tiffayoniton attacked!"); curPl -= 10; plCur.setText("" + curPl); } private void A1MouseClicked(java.awt.event.MouseEvent evt) { …

Member Avatar for NormR1
0
123
Member Avatar for daffydk13

I have the program working but with using ActionListener and ActionPerformed. Instructor wants it changed since it is not the clicking the button that triggers the application but entering in '-1' as a grade. I am lost on trying to change it as nothing seems to work for me so …

Member Avatar for NormR1
0
171
Member Avatar for mohamed mo'men
Member Avatar for NormR1
0
56
Member Avatar for Monkeyseraph

[CODE] public boolean randomFlower() { Grid<Actor> gr = getGrid(); ArrayList<Location> loc = new ArrayList<Location>(); loc = gr.getOccupiedLocations(); int row = (int)(Math.random() * 19); int col = (int)(Math.random() * 19); Location new1 = new Location(row, col); boolean existent = false; // if i is less than size of occupied locations for …

Member Avatar for NormR1
0
90
Member Avatar for insanely_sane

Hey guys. I am currently just a 11th grade student but since I'm done the whole curriculum for my Computers class already, I recently just started making extra stuff for fun. One of things I'm doing is Making a graphical/visual sorting applet. Something like : [url]http://www.cs.ubc.ca/~harrison/Java/sorting-demo.html[/url] I have my code …

0
109
Member Avatar for mayank.15

I am using Lucene Highlighter 2.4.1 for my application. I use the highlighter to get the best matching fragments, and display them. I make a call to a function String[] getFragmentsWithHighlightedTerms(Analyzer analyzer, Query query, String fieldName, String fieldContents, int fragmentsNumber, int fragmentSize). For example : [code=java] String text = doc.get("MetaData"); …

Member Avatar for ~s.o.s~
0
165
Member Avatar for gedas

hi guys, i am planning to undertake a massive project which would be something to do with wii remote as i am aware the wii remote communicate with the console or computer via blue-tooth. i was wondering what sort of data wii remote sends back to the computer or a …

Member Avatar for gedas
0
106
Member Avatar for nchouhan

Hi, i am new to java, and i stuck in between with a folder locking problem. i want to create a private folder without encrypting the data, i have two options 1) Either Lock that folder so none of the user (even admin) can't access that private data. 2)Completely hide …

Member Avatar for nchouhan
0
159
Member Avatar for Naveed_Cn

Hi Every Body! Please any body tell me, is java is so powerful to do system programming wih it like C language and Assmbly.

Member Avatar for vishalbaid
0
2K
Member Avatar for end3r

Hy, I have 4 combo-boxes and each one has a RefreshableValueHolder. If I change the value in one of them, I would like to automatically change contents of the others. I know I have to use the refresh() method of this class, but I cannot figure it out how. for …

Member Avatar for end3r
0
96
Member Avatar for rmsagar

Hi Everyone, I am a beginner with java, please pardon my stupidity The program below is not working and I have this error. Please let me know what I am doing wrong. public class test { public static void main(String[] args) throws Exception { String Month = "May"; if ( …

Member Avatar for rmsagar
0
90
Member Avatar for maxish

Hi, I have implemented a simple socket server in Java. Everything works great except the process just dies/times out after about an hour and I do not know why. I run am running the process through my web host's machine using SSH. My steps: 1. Add to '/etc/rc.local' two commands: …

Member Avatar for masijade
0
418
Member Avatar for Umar Ali

Hello I'm new to java and i'm facing some problem... First code refers to File_Chooser class which works perfectly fine for me... [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package statguis; /** * * @author Umar Ali */ …

Member Avatar for Umar Ali
0
797
Member Avatar for kdmuk10

I am new to java. when i try some code, i get the 'Caught ArrayIndexOutOfBoundsException: 0' message. i need help how to address the problem. the code was as follows. I am leaving out the class name (first line) [CODE]public static void main(String[] args){ try { double hours = Double.valueOf(args[0]).doubleValue(); …

Member Avatar for Ezzaral
0
65
Member Avatar for johndoe444

[CODE] public class FirstJndi { public static void main(String[] args) { String name = args[0]; Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"); try { // Create the initial context Context ctx = new InitialContext(env); // Look up an object Object obj = ctx.lookup(name); System.out.println(name + " is bound to: " …

0
30
Member Avatar for gokul.raja

Hello, I'm having a requirement to develop a GUI based JFrame which should have capabilities to add Multiple JPanel on an event occurrence[Ex. button click] and the JFrame should be scrollable. I tried a lot, but I failed. I also tried to add multiple Jpanel in JScrollpane that also failed. …

Member Avatar for gokul.raja
0
2K
Member Avatar for softdev

hi guys, i have this senario and i want know if that is possible. i want to apply some aspect-oriented concept. i want to have something like, say two classes. one extract some piece of data from xml file and use JSP to display the data. another class/aspect that log …

Member Avatar for ~s.o.s~
0
79
Member Avatar for jcorcoran

I have a school assignment where I have to write class files to correspond with my instructor's already written class, which includes the main() method. He has the main class importing the child class of a ParentClass, each of which is in a different package. In the main method, he …

Member Avatar for ~s.o.s~
0
80
Member Avatar for bsunkel

Hi all, I have a JOptionPane with a YES button and a NO button. All I want to do is be able to press the left or right button on the keyboard to change the focus on the buttons. By using the mouse it works. Is there some kind of …

Member Avatar for viniciusmss
0
643
Member Avatar for idlackage

I have a method that takes in a rectangle shape as a parameter, uses it as a selection box, and finds shapes in an array called shapeObjects that are within the bounds of the selection box. The indexes of those shapes are then added into a new array which is …

Member Avatar for javaAddict
0
95
Member Avatar for arash_khazaei

Hi, I am currently working on curling game for my High School assignment and i have lots of files of code, so i doubt anyone will want to look through them. Im having an issue in which, i have a JPanel and when i call the paintComponent (Graphics g) of …

Member Avatar for masijade
0
108
Member Avatar for Felikim

Hi guys; Am stuck on the following piece of code which is meant to delete obsolete files in a directory in an sms server. It runs well from a windows platform on which it was coded in, but can not run from a linux platforrm correctly. On the linux lastmodified …

Member Avatar for tmanohar
0
331
Member Avatar for ngoelnoi

I am using a Multi column JTextPane. Everything is working fine but I also want to add some space after each column in JtextPane to improve the readability of the text in the Jtextpane. In my current project, it is unable to differenciate between text of two columns. I am …

Member Avatar for ngoelnoi
0
152
Member Avatar for mohamed mo'men

[code]package taskvip; import java.util.Random; public class Main { public static void main(String[] args) { int y =0; Random t =new Random (); fun1 e = new fun1(); for ( e.i = t.nextInt(50); e.i < 100; e.i++) { e.A[e.i]= e.k.nextInt(50); y=e.k.nextInt(); } for ( e.i = 0; e.i < 100; e.i++) …

Member Avatar for mohamed mo'men
0
407
Member Avatar for DrApe1

For my Programming class I have to write a program to get the Date and time from a Daytime protocol server. If you don't know, the format for the Daytime protocol is as follows: [code]JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) *[/code] YR being the last two digits of …

Member Avatar for aspire1
0
128
Member Avatar for rythreion

[code]import java.io.*; public class BaseTransform { private final BufferedReader buffer=new BufferedReader(new InputStreamReader(System.in)); public BaseTransform(){ try{ System.out.print("Enter any integer: "); int input=Integer.parseInt(this.getInput()); System.out.print("Enter a base[2...16]: "); int base=Integer.parseInt(this.getInput()); String answer=this.transform(input,base); if(answer!=null){ System.out.println(""+input+" at base "+base+" is "+answer+"."); }else{ System.out.println("Error!"); } }catch(Exception e){ e.printStackTrace(); } } public static void main(String args[]){ BaseTransform …

Member Avatar for peter_budo
0
94
Member Avatar for zeah

Hi, I am building a searchengine which searches some html and text files in the web directory. I was trying to use lucene. I was able to index the file and query a word and get the documents which contains that search word. But the problem i was incurring is …

0
51

The End.