32,204 Topics
| |
Is there any program that can help me customize my GUI? Like add some color and pictures? Adding color into my Jpanel, JBotton, etc? | |
Hi there developers! I'm trying to develop my own online multiplayer game, using the DarkGDK. But I don't want everyone to have access to the media of the game, so I'm working on my own cache archive format. This is how it works: .idx0 = textures .idx1 = sprites .idx2 … | |
Here's my problem. I need to add only the first and last elements of each row, and display them separately. Ex. Row 0=11 Row 1=11 Row 2=8 [CODE]int arr[][]={{5,9,6},{3,2,8},{7,0,1}}; int sum=0; for(int row=0;row<arr.length;row++){ for(int col=0;col<arr[row].length;col++) sum=arr[row][col]+ arr[row][col]; System.out.println(sum+" ");[/CODE] this is my code, and i think i just need some … | |
How could I empty my JTable (AbstractTableModel)? If I run [ICODE]tableModel.deleteData();[/ICODE], then the message "0 >= 0" appears. Thanks! [CODE]class QueryTableModel extends AbstractTableModel { Vector cache; // will hold String[] objects int colCount; String[] headers; String url; String databasename; String login; String pass; Connection db; static Statement statement; public QueryTableModel(String … | |
[B]Any ideas on how I would could this to add the selection in each box and put it in the total charges label? [/B] [CODE] import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; /** The Main class creates the GUI … | |
Hi! How could I open a file saved on FTP Server? I'm using org.apache.commons.net.ftp.FTPClient to save/delete files. There are only 5 types of files: doc, docx, xls, xlsx, pdf. If I select a pdf file, then it must be opened in Adobe Acrobat, etc. So, what is the best approach … | |
Hello im trying to create a character with pre devined animations. The characters parts must be changeable. I was wondering if there is a way in JAVA to create some sort of skeleton animations and add graphics to the skeleton. P.S. I was wondering if someone knows a good book … | |
Hi, i'm a newbie here, I was confused when i try to create multisession Socket Server which can provide logged based system, please somebody who knows the solution, help me to solve my problem... thanks for all...:$ | |
/* Calculator program*/import import java.awt.*; import java.awt.event.*; import javax.swing.*; public class JCalculate extends JFrame implements ActionListener { JLabel lblnum1=new JLabel("Enter first number"); JTextField txtnum1=new JTextField(20); JLabel lblnum2=new JLabel("Enter second number"); JTextField txtnum2=new JTextField(20); JLabel lblresult=new JLabel("Result"); JTextField txtresult=new JTextField(20); JButton btnadd=new JButton("Add"); JButton btnsub=new JButton("Sub"); JButton btnmul=new JButton("Multiply"); JButton btndiv=new … | |
How do I allow the display to show numbers with the commas, but then when it does the calculations, have the commas go away for the math since obviously java can't read commas in calculations? example [CODE] DecimalFormat df0 = new DecimalFormat("###,###.00"); JFormattedTextField loanText = new JFormattedTextField(df0);[/CODE] the user puts … | |
below is my code about a method regarding arrays. The purpose of my program is to let the user input the length of the array. and then insert numbers into the array, sort the numbers, and let the user search the contents of the array. my problem is i dont … | |
Hi, ^^ I'll be competing for a java programming contest next week and one of the instructions is to "Receive input from the console window (of JCreator)." Thus, programs shouldn't involve any GUI. I've found this very useful tool called Scanner in the java.util package. My self-training was going smoothly … | |
Ok, well Iam just about done with one of my assignments, but Iam having a problem at the end of it. Iam suppose to find a maximum income of the families income that the user inputs and I have to find the families that make less than 10% of the … | |
Hey Guys i was wondering if i could get a bit of help I'm creating a program that contains a number of different sorting methods (insertion, quick, merge) that sort an array of bikes. [CODE] Bike[] bikes = new Bike[13]; bikes[0] = new Bike("Mountain", 160, "Diamond", 6, 18, "Standard", "Hardtail", … | |
Hello. I going to write fames.xml with my app. I need to know the best way to handle adding a block of XML but not at the end because I need to have the root element at the end. Any ideas. 1.never end it but when I use it add … | |
I have no idea how C++ works, but I'd like to learn... Is it possible to create java files/programs using C++? | |
Hey guys I have a method that is calculating a time based two JComboBox selections. I am returning the time as a Date object but it prints the date and time, when I say 'cal.getTime()'. The date is always the same, the format is Thu Jan 01 (time i calculated) … | |
Hi! My code worked correctly, but now it produces the error message. It seems that the command [ICODE]treeModel.reload();[/ICODE] doesn't work anymore. Please explain me what happens? [CODE] private void addOrgFolder() { String[] data = new String[2]; data[0] = text2.getText(); data[1] = text1.getText(); DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)SystClasses.TreeEditTest.tree1.getLastSelectedPathComponent(); tableModel.setQueryDontChangeTable("insert ..."); DefaultMutableTreeNode nNode … | |
Hey. I've been working on this for a while and am having a lot of trouble with it. What I have to do is: Some processing requirements: - all data entry will be in the main method - must use a sentinel loop to stop processing salespersons - must test … | |
Hello people. I am writing a program that helps users see if they can afoord monthly costs (tuition and rent). here is the main method: [CODE]import java.io.*; public class UserClass { /** * @param args */ public static void main(String[] args) throws IOException{ Finance fin=new Finance(); fin.liveWithParents(); fin.amountRent(); fin.collegeTuition(); fin.getMonthlyCost(); … | |
Here is my code: [url]http://pastebin.com/KTR86nzD[/url] This is input.csv: name,age Fred,88 Stella,11 Nellie,99 George,22 Violet,33 Rose,77 Bob,66 Lena,55 Billy,44 It should print the above in this format - Fred is 88 years old Stella is 11 years old Nellie is 99 years old ... Billy is 44 years old. Afterwards, it … | |
[CODE]public class ReverseArray { //declare an array variable //do not call new yet! int[] array = new int[100]; int a; int[] getCopy = new int[array.length]; /** * Constructor * * Reads in int values and stores them in an array. * The first int in the input is the number … | |
Hi! If I run the code shown below from my local machine, where the FTP server is installed, then everything works correctly. However, if I try to run it from some other machine, then the message "Cannot connect to the FTP server!" appears. Settings of my FTP Server are shown … | |
Hi I am creating a Media recorder/player using JMF. I have created a frame which is GUI based with buttons. Can anyone help me by writing the code of the function to increase/decrease volume and develop a playlist for playing different media files? | |
Hello I am quite new to GWT and Java. I am doing an assigment which helps students select courses. The application starts and the user clicks on a department. When they click on the department the courses offered by that department are shown with check boxes next to each course. … | |
hello everyone hope all ok i'm facing a problem in Netbeans in that when compiling no error exist but when running nothing happen or displayed, can anyone help me in it plz | |
ok so I have to make that toggleCircusStatus() gives me the opposite of fromCircus [QUOTE]Write a public method called toggleCircusStatus that negates the value of the circusStatus variable.[/QUOTE]] [CODE] public class Elephant extends Mammal { private boolean fromCircus; public Elephant() { super(); fromCircus = false; } public Elephant ( String … | |
How can I check if an input is a String of alphabet characters..not int double etc etc... | |
Hello Everybody, I am a beginner, I am got stuck with following error at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) … | |
I keep getting these errors in the program below. Here is the assignment: http://www.people.vcu.edu/~dprimeau/cmsc255/fall10/fifthprogram.html C:\Users\FerretFool0x77>javac Person.java Person.java:43: illegal start of expression public void recordpersonsinhousehold(int x){ //created 11/16/10, modified 11/19/10 ^ Person.java:43: illegal start of expression public void recordpersonsinhousehold(int x){ //created 11/16/10, modified 11/19/10 ^ Person.java:43: ';' expected public void recordpersonsinhousehold(int … |
The End.