32,207 Topics
![]() | |
I know alot of you guys get the same posts over and over about intro JavaII Classes, but I have tried to refrain from asking something that has already been solved and try learning on my own, but Im stumped. Im having trouble with this program, specifically at my calculation … | |
I have recently started using VIM for writing java code so I'm still getting use to the things i can do with it. I'm having trouble compelling the file directly in vim. I would like to have it so i can use :compile to compile the programs and then it … | |
How do I clear/renew/empty/refresh a 2D JButton Array? I've tried a lot of things, but all that is happening is the new 2D array, just adds onto the old one, which is not what I want. It won't even just overwrite the old array. So i am not sure what … | |
how do i add multiple pane in frame dynamically that is in my frame there is one text box which take value from user when user click on ok button i have to add that much panel in jframe how do i do that ? | |
I can't figure out why I get the NullPointerException on Line 223. Would appreciate any help whatsoever. Sorry about the spacing below. Some of the code appears messy. Toggle Plain Text and it should look better. [CODE]/* Section 1: Import Statements. Imports the Scanner class and the IO Package. */ … | |
Hi folks So I'm developing a small game for a homework question. I have 3 classes. Apart from the main class, my drawing class draws on screen the objects for my game, like so.. [CODE] public void bat(Graphics g) { //draw the bat g.setColor(Color.ORANGE); g.fillRect(batX, batY, breadth, batLength); g.getClipBounds(); } … | |
can anyone tell me how to get out of the error Connection refused: connect thanks in advance | |
Hi Guys well what I am trying to do is set a background image for my program where my labels, buttons , and text areas sit in front of the background. Everything I try I try I cannot get it to work. My jframe layout is below so any help … | |
Hi, I am new to java and I need to work with arrays. I have found some tutorials, but everywhere was something like [CODE] int[] anArray; // allocates memory for 10 integers anArray = new int[10]; [/CODE] But what if I dont know how long the array will be? When … | |
hey everyone, I'm trying to perform a program that will perform a leap year method and also have it to loop. here's what i have so far: import java.util.Scanner; public class LeapYear { //Create a Scanner object for keyboard input. static Scanner keyboard = new Scanner(System.in); //Set variables public static … | |
I have a requirement to copy files from a temporary file directory to a unix file system using scp. Please provide me a sample code for this | |
Can someone help me on how to draw a dynamic pie chart in java? I don't want to use jfreechart. I want to use jtable or other methods if available(but simple one) I have one but it is static.i need to write it upon user input.how can i do it? … | |
![]() | I am trying to cast combo box to string but I have problems with it. I get NullPointerException? [CODE] fontStyle = (String)combo.getSelectedItem(); size = (String)comboSize.getSelectedItem(); if (fontStyle.equals("Regular") && size.equals("10")) { Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 10); text.setFont(font); } [/CODE] |
![]() | run: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.sun.java.swing.plaf.nimbus.NimbusStyle.init(NimbusStyle.java:418) at com.sun.java.swing.plaf.nimbus.NimbusStyle.validate(NimbusStyle.java:359) at com.sun.java.swing.plaf.nimbus.NimbusStyle.getValues(NimbusStyle.java:927) at com.sun.java.swing.plaf.nimbus.NimbusStyle.getInsets(NimbusStyle.java:605) at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:896) at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(SynthLookAndFeel.java:275) at javax.swing.plaf.synth.SynthLabelUI.updateStyle(SynthLabelUI.java:53) at javax.swing.plaf.synth.SynthLabelUI.propertyChange(SynthLabelUI.java:232) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at java.awt.Component.firePropertyChange(Component.java:8128) at java.awt.Component.setName(Component.java:935) at javax.swing.plaf.synth.SynthComboBoxUI$SynthComboBoxRenderer.getListCellRendererComponent(SynthComboBoxUI.java:409) at javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(BasicComboBoxUI.java:1334) at javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(BasicComboBoxUI.java:903) at javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(BasicComboBoxUI.java:892) at javax.swing.JComponent.getPreferredSize(JComponent.java:1634) at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedPreferredSize(GroupLayout.java:2944) at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedMinimumSize(GroupLayout.java:2930) at javax.swing.GroupLayout$ComponentSpring.calculateMinimumSize(GroupLayout.java:2897) at javax.swing.GroupLayout$Spring.getMinimumSize(GroupLayout.java:1315) at javax.swing.GroupLayout$ComponentSpring.calculatePreferredSize(GroupLayout.java:2904) … |
hi i have another network problem! when i close the socket in server side or the client side i get connection reset exception and then i'm not able to reconnect without resetting the server then start the client again, so how can i close a socket and reconnect without resetting … | |
Guys can any one help me in JAVA? how does it help in making softwares? | |
Hi, i have the following code in Java as you can see there are a lot of code repetition. I want to know how i can loop this part of code instead of writing it each time? [CODE] g.setColor( Color.black ); g.fillArc( 110, 80, 300, 300, 0, valint[0] ); g.drawString("BMW", … | |
What is the best way to start/stop/restart Apache Tomcat using Java code? If it cant be platform dependent (or complicated or I have to do a "IF" for each), then only for Windows. Thanks | |
Hi the project i have is Write a program that displays diamonds as text using a character provided by the user. For example, a diamond of height 6 constructed from asterisks will display as follows: __* _*** ***** ***** _*** __* (I cant make it line up perfectly... ) after … | |
I do the program to practice what I have learned in a class at my university(convert input of infix form to post fix one), but my program doesn't run correctly. Please help my to find out my bug. == IntoPost class /* * To change this template, choose Tools | … | |
I have the following piece of code. I do not understand why its not working. I'd really appreciate help on this. [CODE]import java.util.Scanner; import java.io.*; class ReadFiles { String [] codes = new String[99]; int i = 0; private Scanner readCodes; public void openCodesFile() { try { readCodes = new … | |
This is just a part of a program When my code asks me Enter diamond size ("short", "average", or "tall"): how do i make it so that if i don't put anything and press enter it asks me exactly same questions again?? i tried putting input.length() == 0 or input.equals("") … | |
Hey, I'm trying to store data in a record store then sort it, but I'm getting weird results when I try to add anything to the recordstore object... I was using a for loop to add records, and I noticed that the recordStore contained way more records than I added. … | |
please help me with my codes, it doesnt work somehow [CODE]import java.util.Scanner; public class calculateE { public static long factorial( int n ) { if( n <= 1 ) // base case return 1; else return n * factorial( n - 1 ); } public static void main( String [ … | |
[QUOTE]i am trying to implement a fitness function for GA. i got a code written in python. i don't have any idea about python. can someone help me to convert it into java the code is here [/QUOTE] [CODE]# there are many ways to do an eigenvalue decomp, this is … | |
i Write a program to check whether a matrix is an identity matrix but i do not know how to find it plz help me this my code [CODE]package javaapplication162; import java.util.Scanner; public class JavaApplication162 { public static void main(String[] args) { Scanner input = new Scanner (System.in) ; int … | |
hello ! basically i am working on .net , but now i want to learn java , is there any software like visual studio for .net .if yes then please can any one tell me or provide me any helpful link. Best Regards M.Waqas Aslam | |
What (if anything) is the difference between these two? [CODE]String[] sa = {"ABC"}; String[] sa = new String [] {"ABC"};[/CODE] | |
I'm creating a program which has data in the linklist. I'm trying to print out the element in the linklist from head to tail and tail to end, but for some reason, I run into some compiler error. I don't know why it won't let me call the hasPrevious and … | |
GUIdancer 3.2, the latest version of flagship automated GUI testing tool from Bredex, now "officially" supports Windows 7 and Vista, and includes additional enhancements to its library of pre-built test actions. It began shipping on Nov. 3. Before you decide that US$5785 is too much to pay for an automated … |
The End.