32,204 Topics

Member Avatar for
Member Avatar for bertyhell

is this a bug in nimbus or am i doing something wrong? i make this jframe: [CODE] package nimbus_bug; import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.UIManager; public class Main extends JFrame{ public Main() { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); } catch (Exception e) {} this.setLayout(new …

0
74
Member Avatar for wandrewm
Member Avatar for bertyhell

i made a jtable in java with 2 columns when i select some rows and click a button it should get the selected rows but this array comes back empty here are some sniplets [CODE] JScrollPane scroller = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); scroller.setBorder(null); this.add(scroller,BorderLayout.CENTER); customers = new JTable(); scroller.setViewportView(customers); customers.setAutoCreateRowSorter(true); customers.setModel(new …

Member Avatar for bertyhell
0
569
Member Avatar for kgkamaraj

Hi. I am passing different kind of text file and calling same function.. Can any one know how to avoid these repeated code. [CODE] public static void main(String[] args) throws IOException,NullPointerException { MultipleLinearRegrssionModel fex = new MultipleLinearRegrssionModel(); //Calls Read From File //First ocument docsum=1; fex.readFromFile("f:/project/document/training/1.txt"); //Calls compare training corpus and …

Member Avatar for kgkamaraj
0
207
Member Avatar for polska03

I am only showing the spaceport and fileIO. I want the first line of my txt file to show the number of spaceship to create an array then choose what type of spaceship. I did the best i can and now i am completly stuck its not working. Can Someone …

Member Avatar for javaAddict
0
142
Member Avatar for viking3579

Hello I'm trying to get a jTextField to be updated by another class however the validate() and repaint() aren't working. However, it is saying that the text has been changed for my jTextField. Below is the code could anybody explain to me why its not updating the repainting the jTextField …

Member Avatar for gangsta1903
0
420
Member Avatar for sandyben

Hi..I basically new wit java. i have a program called Transfer.java..n when i press button caleed "start Transfer" it executes FileServer.java [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.Random; import java.util.*; import java.text.*; import java.rmi.*; class transfer extends JFrame implements ActionListener, Runnable { JButton btntrans,btnexit; ImageIcon bc; …

Member Avatar for gerdonhanry
0
145
Member Avatar for Ghost

Hi Everybody, I was wondering how to make a java image editing application. Basically, I really want to make a program that allows the user to drag and stretch images. I don't want the code. I'm only in search of a decent tutorial. Thanks in advanced for your help.

Member Avatar for manojnbn
0
2K
Member Avatar for bagabont

Hi there, I have a task to Create a program that: -finds the shortest way which connects the root with a leaf in the Tree; -finds the closest common parent of two given nodes A1 and A2 in the Tree; -finds all nodes, which are simultaneously parents of nod A1 …

0
47
Member Avatar for ahp@aol.in

Hi folks, Using shell script I'm running two java applications at background. The output of 'ps -ef' is UID PID PPID TTY STIME COMMAND Amar 2388 1 con 15:35:58 /usr/bin/bash Amar 1272 1 con 15:44:29 /cygdrive/c/Program Files/Java/jdk1.6.0_01/bin/java Amar 3972 1 con 15:44:55 /cygdrive/c/Program Files/Java/jdk1.6.0_01/bin/java Amar 1600 2388 con 15:46:12 /usr/bin/ps …

Member Avatar for masijade
0
402
Member Avatar for pankajagar2002

Hello frnds, I am suffering with a problem. Please help me. The problem is when i am displaying a list of items or say component in to view then the list got weird or we can say jumbled(one item above another) comes for a short moment(less than 1 sec). i …

Member Avatar for BestJewSinceJC
0
277
Member Avatar for shorty246

NEed HELP starting it off..not sure what im doing wrong..Please!! The Percentile class The constructor of your class should have one parameter representing the capacity of the array that the class will contain. The array should be a double array with its length equal to the capacity. You will also …

Member Avatar for BestJewSinceJC
0
137
Member Avatar for laelzio.mosca

I`m taking java class and I`m thinking about getting one of those mini laptops just to do my school work and be able to access the internet. for the price and portability, I`m looking at the Acer Aspire One AO532h-2326 I`d like to get an advice from you guys. How …

Member Avatar for BestJewSinceJC
0
80
Member Avatar for TheWhite

One of my programs work with MySQL (Connector/J Driver). The issue is, some of the contents I'm passing into the query string are read from a file that contains several escapable characters. When I try to commit the query (such as an INSERT) with a value that has unescaped characters …

Member Avatar for BestJewSinceJC
0
142
Member Avatar for christiangirl

Hey, I am trying to make a program that has pictures on the GUI, but am having trouble making the picture show up. Here is the code: [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; /** Quick example showing images (specifically ImageIcons) on JButtons and JLabels @author Sharon Tuttle @version 11-04-08 …

Member Avatar for BestJewSinceJC
-1
243
Member Avatar for Zoxx98

Hey everyone, first time one here and i thought i would show my most recent university java assignment. I'm just looking for feedback... wanna see if i am developing good habits or bad. the assignment is completed and marked by my uni so i am not looking for help.. they …

Member Avatar for BestJewSinceJC
0
172
Member Avatar for intes77

Im abit confused about the problem im solving right now. it says that i will create a program that would let me input any word, and count how many letters are there. and afterwards i will also make another statement letting me input any letter,then the program would determine if …

Member Avatar for BestJewSinceJC
0
169
Member Avatar for Conielo

Hello, I am a complete beginner at Java and I'm having a problem with something I don't understand at all. I'm trying to complete some homework in which I need to finnish off writing a small program which reads a text file and checks brackets in the file. Basically, it …

Member Avatar for Conielo
0
162
Member Avatar for NinjaLink

Hi, I'm having trouble getting age 10 occurrences and then removing age 10 from the list. Then I want to be able to print the list without displaying age 10 in it. I trying to use my bag class implementation to do this successfully. My bag class is below. Any …

Member Avatar for IsharaComix
0
157
Member Avatar for mimsc

Hello..Im trying to read the HTML from a URL and I threw in yahoo.com as a test...for some reason, "n.readLine()" is coming back as NULL and the while loop fails...and ideas?? thanx [code] <%@ page import="java.io.*" %> <%@ page import="java.net.*" %> <%@ page language="java" %> <%@ page import="trader.webservices.util.Utils" %> <%@ …

Member Avatar for kk4real
-1
107
Member Avatar for supersoup

If you are writing a switch statement that takes in a scanner type, how do you prevent a runtime error if a string or char is entered. [CODE]Scanner s = new Scanner(System.in); int a; a = s.nextInt(); switch(a){ }[/CODE] So if i ran the code and entered "abc" then i …

Member Avatar for BestJewSinceJC
0
115
Member Avatar for motress

TYPE=WIFI|TIME=1263867778390|ID=00:24:c3:31:2b:e0|NAME=csusm|RSSI=-93|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:12:17:7b:33:04|NAME=csusm|RSSI=-80|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:1f:27:55:f7:70|NAME=USMHotspot|RSSI=-70|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:1e:13:ee:3e:40|NAME=USMHotspot|RSSI=-85|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:24:c3:31:b8:80|NAME=csusm|RSSI=-91|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:90:4c:60:04:02|NAME=csusm|RSSI=-94|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:1b:0d:d6:6d:50|NAME=USMHotspot|RSSI=-70|WEP=true|INFR=true The above is a part of my log file. The problem i faced is how to just get ID with its particular RSSI value ? Because i want to calculate the average RSSI value for each different ID . I tried split.string, delimiter, …

Member Avatar for BestJewSinceJC
0
196
Member Avatar for smokin745

Ok now suppose i have some code and there is a point where the user is asked to input some value into showInputDialog...and then the user must input a String value, but if the user inputs an integer value, the program crashes...please help me and explain me how can i …

Member Avatar for Cort3z
0
168
Member Avatar for kvass

Hey everyone! If I have a matrix as follows: int[][] mat = new int[5][3]; Does that mean that the row size is 5 and the column size is 3 or vice-versa? I am really confused about whether the order is [row][col] or whether it is [x][y] in relation to the …

Member Avatar for masijade
0
113
Member Avatar for Emmett_1981

Hi everyone, I am using the Struts 1 framework to develop a web application for my FYP. So far I have been able to access the properties file from all jsp in my application with example such as the following code. [CODE]<bean:message key="welcome.title"/>[/CODE] I want to have the entire web …

0
168
Member Avatar for Destiny1

Hello, everyone. I'm at the moment doing a homework assignment involving static methods and arrays. It consists of the following instructions. I'm to create a class known as ArrayStatisticsMethods and in this class, there are definitions to four different "public static" methods which will be described. I'm provided the use …

Member Avatar for mkurdukar
0
503
Member Avatar for Accendo

Hey there guys, first post here :). The problem I have is regarding 2D arrays ofcourse. So I have a .dat file that is 1000x1000 in size, I then need to find what the [B]int[/B] is given a specific x,y co-ordinate. I scarcely know arrays and have no idea on …

Member Avatar for javaAddict
0
134
Member Avatar for rena0514

in this program i have to use listners, and radio buttons and buttons....right now i am doing the first part of the program where when the user selects the radio button for circle two circles appear on the screen..... [code] import javax.swing.JFrame; public class shapes { public static void main(String[] …

Member Avatar for javaAddict
0
151
Member Avatar for iamsmooth

So I'm redirecting my print outputs to a stream, which becomes a char array. Then, when I use Junit, I use .toString() on the char array to make it become a long string. However, when I compare the string with the exact string that it should be, it says they …

Member Avatar for masijade
0
96
Member Avatar for Olliepop

Hey guys! Would some kind soul please be able to tell me how i can add some form of text field (for user input) which can be positioned anywhere easily with X and Y values and has no border (or the border is removable).. I've seen it many many many …

Member Avatar for Olliepop
0
140

The End.