32,204 Topics
| |
Hello, I have written some java classes to generate a random network. The network is made of : 200 nodes . Each node has a maximum of 50 neighbors. What i want is to Randomly chose a node from that network and GRAPHICALLY show it with its one hop neighbors … | |
I created a simple [B]Node.java[/B] class, where each Node instance has an 1-id variable of type int 2-Neighborlist of type Arraylist I wrote a code that gives me a random network, made of 200 nodes, and each node can have up to 55 neighbors. [CODE]for(i=0; i <200; i++ ) // … | |
Hi, I am new to java (normally program in perl and bash). I have an array that has X amount of rows that look like this: 2011-02-24,XXXDAO_456912 - (none) - (direct),(none),(direct),(not set),(not set),0,5447,1,3639.71,3521.86,0,0 What I need to do is take this column - XXXDAO_456912 - (none) - (direct) - and … | |
it give an access denied<java.io.filepermission Item.txt write> error any suggestion for a simple id generator? [code]import java.applet.Applet; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.lang.*; public class Shoes extends Applet implements ActionListener, ItemListener { Font SansSerif = new Font ("SansSerif", Font.BOLD, 12); Button create = new Button("Create a … | |
Hi guys, ran into a small problem, i can read & write anything i want to a text file as well as append to the end of the line but I cant seem to figure out how to edit a specific line. Lets say in the text file i have: … | |
I recently came across [URL="http://www.twilio.com/"]Twilio.com[/URL] that provides API facilities to implement voice or text capabilities through the internet. They aren't the first to provide this kind of service but the capability of the API and their pricing seem to make them worth looking at for anyone who has a need … | |
I write a simple average program, but for some reason I keep getting compiler error. I tried to check my work, but still can't find where do I do wrong. It shows the message on average = total/10, and it says something like unable to reach statement. [CODE] //test import … | |
Hy, I'm trying to read from a xml file and save it's data in an ArrayList then a HashMap my xml file looks like this: [code] <components> <component id="door1"> <bounds> <left>10</left> <top>5</top> <width>25</width> <height>10</height> </bounds> <properties> <propertie name="allignment" value="horizontal" /> <propertie name="orientation" value="top" /> <propertie name="isOpened" value="false" /> <propertie name="isLocked" … | |
I hava my program working, but it will not display in the JTextArea of the GUI. I believe that I am missing a line of code. However for the life of me I just cannot figure it out. Please Help. Here is my code: Thank you for the help!!! [code]package … | |
I have a motion detection code that creates a processor for my webcam bu then I want to transmit this video stream also. I am trying to use the VideoTransmit code provided by sun. Can I be able to modify it to use the same processor as my Motion detection … | |
Hello, I am new to Java and would like some help. I have to write a small application that converts a user inputted sentence to a string array. The string is 'cleaned' from special characters before splitted into an array (Only numbers and alphabetical characters are allowed). I have managed … | |
Hey all! I am having trouble debugging my program, and after exhausting all of my options i decided to come to you guys. The assignment requires us to create our own custom linkedList class representing a polynomial, where each term is a link. I have most of it working, but … | |
hey guys i need help with my tic tac toe program - its just the rules of the game not the graphical parts. the gameisover() method isn't working its supposed to check each row and column and diagonal to see if it has all X's or O's and it should … | |
Hi guys, Im trying to compile this class below, but its just not working, it keeps sating 'missing return statement' int the method declaration line. Can u see to check if there is anything missing in my code or if iv done something wrong?? Thanks! public class swapping { public … | |
Hi, I have initialized an array like this: [CODE] int[][] my_array= new int[28][28]; my_array[-6][12]=2; [/CODE] But when i assign my_array with my_array[-6][12] it is giving me error.I know the doubt is very stupid but I am very confused. I want to store values in an array which has negative as … | |
Hi I been trying to figure out this problem for last few days but cannot find the answer. I am trying to use nested for loops to try and create a 6 character string using letters/numbers from a array. I need it so that it starts off with one character … | |
I'm trying to create a program in Java that I have in C++. In my C++ file, I have main the main method outside of any classes. Eclipse does not seem to like this. Is this not possible in Java? Do I need to put main in a class? import … | |
Hi i get "illegal start of expression" compiling error ZMOD.java:1295: illegal start of expression for (int j = 0; j < paramArrayOfgz.length; j++) localArrayList.add(paramArrayOfgz[j] = = paramArrayOfgz[j]); ^ 1 error Press any key to continue . . . the whole code is this [CODE] import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; … | |
I've been making games for a Nintendo DS homebrew with PAlib and DevkitPro and C code for a while now but I was wondering if DS game development would be available with Java. If not the DS, what would Java be able to make games with? I know that Android … | |
hello im having problems on how to make a column sorter for my JTable. i want to make a sorter for each column. but i dont know what to do. any advices will be glady accepted :) i've seen other tables that their column headers can be clicked to sort … | |
Hello, I have a calculator that has a set of memory buttons that I want to store the result of a calculation in.. Here is the code: [CODE] ActionListener memPadListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String memOperator = e.getActionCommand(); double numForMem = 0.0; if (memOperator.equals("M+")) … | |
Hi, I have a project that uses 'basicplayer', a mp3 player. I can get it to work when it runs in netbeans 6.9.1, but when I build project (into jar file in dist folder), it no longer runs. I need to get the jar files that I added to project … | |
Could anyone point me in the right direction or provide a step-by-step process to create an expression evaluator in Java using StringTokenizer, Stacks, and Recursion? It would be appreciated. The method I need help with is "public float evaluator()" Here's the current code: [CODE] import structures.Stack; import java.io.BufferedReader; import java.io.IOException; … | |
I have imported a project in my Netbeans workspace. It asks me to Resolve missing server problem. I right clicked the project and clicked on 'Resolve missing server problem'. It asks me to Add the server which i did (Tomcat 6.0) and then it asks me to browse the location … | |
Hi Am working on s shape inheritance hierarchy project where we are supposed to define 2d or 3d shapes then use a few examples e.g circles or spheres to calculate areas and volumes of the 2d and 3d shapes respectively. Everything is working fine it compiles and builds successfully but … | |
Hello Guys, Im Using GridbagLayout as LayoutManager, but I am not able to place my button at top-right of my frame. I'm also attaching my current output and what i actually want to do. here's my code: [CODE]package projectilemotion; /** * * @author Taimoor */ import javax.swing.*; import java.awt.*; public … | |
hi guys, i am trying to store a bigrams into a dictionary. but i am not sure what is the best way to do it?should i use hash table to store it?if yes, how to know whether the word for example am belong to amazing and maybe other words. thanks | |
[code=text]jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Users/Kix/Desktop/IMPORTANT DOCS/oop/BANKSYSTEM/Accounts.mdb;DriverID=22;READONLY=false} Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at banksystem.BankDBDriver.retrieveData(BankDBDriver.java:200) at banksystem.BankSystem.actionPerformed(BankSystem.java:109) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6267) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6032) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) … | |
what are categories of each of the compile time errors and run time errors with examples for each | |
I thought "JTree. setRootVisible(false)" would hide the root yet display its children, but it doesn't. I've even tried to expand its children but nothing shows when I hide the root. Here's the code if you need to see it. [code=java] DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Root"); JTree projectTree = new JTree(rootNode); … |
The End.