32,199 Topics
| |
hello can you help me please how can i make the function array...please help me because i have no idea for this...thank you in advance hoping for your positive responds... | |
SINGLE USER CONTIGOUS SCHEME: INPUT THE SIZE OF MEMORY DISPLAY THE SIZE OF THE OS BY COMPUTING 20% OF THE MEMORY INPUT THE NUMBER OF JOBS EXAMPLE: IF THE NUMBER OF JOB IS ENTERED THE SCREEN WILL GIVE YOU AN OUTPUT LIKE THIS JOB 1; JOB 2; JOB 3; JOB … | |
I have a problem how to transfer my European CApitals Array into JLabel Array, without writing the capitals on each JLabel. I figured out my dropdown menues, but I want to display the counties on JLabels and parallel to it, the textboxes for the capitals, with the JButon next to … | |
Hi! I would like to create textfields that will serve for sorting data in JTable, and the width of these textfields will correspond to a column width. So, below you may see the code that worked until I did not use an array of textfields. Now, the size of [ICODE]txtRegNum[/ICODE] … | |
We have this script that makes the photo change when you mouseover different items on the list. How can we make the photo link change as well? For example, how can we make the photo link to Yahoo when we hover over item 1 but to Google when we hover … | |
Can somebody help me change the rectangle to an oval? I try importing the Ellipse but it doesnt work :( [ICODE]import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.TexturePaint; import java.awt.geom.*; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import javax.swing.JFrame; import javax.swing.JPanel; import com.sun.image.codec.jpeg.ImageFormatException; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageDecoder; … | |
Hi all! I have moved on to learning about classes.....they don't seem as bad as the past things I have done so far. I have, however, hit a few snags along the way. Here is my code for my Rectangle class [code] public class Rectangle { private int x; private … | |
Please help I am brand new to java I need help creating the java code so that when I click a button it will add .01 to a running total. I have tried to modify a calculator code but it did not work. Any help at all. Thank you | |
I'm writing Solitaire in java and have each column of cards set up as a 2d arraylist of JLabels, one label hads the icon and is painted to a jpanel. The other contains the url for the image as the text of the label. Below is part of the code … | |
Hi there, I'm working on a 'queue program' which will queue 30 job numbers(case 1) between 1 and 30, validated, in an array, display the array , (case 3) and remove a number from the back of the queue.(case 2) I have the display array and remove from front of … | |
Hey guys. I have a headache here as im new to Java. Ive tried searching, but found nothing that really helped me out. forgive a noob :) Im trying to split a string from a textfile with the following format: 0 0 0 0 0 0 0 0 0 110 … | |
this is inside my servlet: [CODE]ArrayList<String> currentCustomer = model.getAllCustomers(); req.setAttribute("currentCustomer", currentCustomer );[/CODE] how do i access this arraylist in my JSP file? I eventually wanna loop over each string element. | |
Just I am confused to choose which type of programming language for project development.... | |
Hi I wanted to know how to do this: - when the user clicks on a index in listbox from classA - the value of that index(written in classB) will go into the textbox from classC I have already written the coding for classA I just need help writting the … | |
[ICODE][/ICODE]Hi, I am trying to figure out how to start my next Inventory program part 4. What I wish to know is 1. Do I choose a New Project or choose New File? What I have been doing so far is choosing New Project. All the programs are extending from … | |
Hello, I basically have 2 GUI windows in my project. Just to explain it better, let's call the 2 GUI windows: - Window A - Window B In Window A, there is a variable that I want to change, but I have to change the value of the variable in … | |
Hi all! I am extremely new to java and to computer programming in general so I greatly appreciate all our help. Here's my problem, I am trying to write a program that reads in a basic text file with some names and some numbers, and inputs the given information into … | |
Is there a way by which I can examine how the class Class was coded? | |
[CODE]import javax.swing.*; import java.awt.*; class Calculator{ JFrame frame; JPanel panel1, panel2; JTextField textField; JButton button[]; Container contentPane; void launchFrame(){ frame = new JFrame("My Calculator"); panel1 = new JPanel(); panel2 = new JPanel(new GridLayout(4,4)); textField = new JTextField(10); button = new JButton[17]; for (int i=0; i <10; i++) button[i] = new … | |
Hello. It's been a while since I was on here. I'm writing a Java class with a generic type parameter. Among other things, it maintains an internal ArrayList of the same generic type as itself. In a perfect world, the code would go like this: [CODE=Java]import java.util.ArrayList; public class MyGenericClass<T> … | |
Hi everybody, I am planning to build a java programe named word counter. It shall have file view and help menu. A text field where user can type or paste text. A button which starts counting number of words in the text. and a text field where the total number … | |
I'm trying to improve one of my project by adding texture to a shape. The shape is oval, it basically the moon. I want it to have a realistic feel rather than gradient fill. So I look up some tutorial and this is what i got from [url]http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Graphics.doc.html[/url] [ICODE] // … | |
[code]public double bigramPMI(String bigram,String []bi) { String[] arr = bigram.split(" "); int n11 = 0, n12 = 0, n21 = 0, n22 = 0, n1p = 0, np1 = 0, n2p = 0, np2 = 0, npp = 0; double m11 = 0, PMI = 0; for (int i = … | |
I have been trying to remove two errors in this code, line 12 (non-static variable this cannot be referenced from a static context) and line 204(cannot find symbol:(method `compareTo(java.lang.Object)` import java.util.*; public class InventoryPart3 { public static void main(String[] args) { Inventory invent = new Inventory(); <---[U]non-static variable this cannot … | |
i am having this problem , i have 8 strings say ( boy,topped,pens,remotes ,boted ,toyed, car,house) but i am looking for 3 strings having substrings ending with a (ed,s,s ) for exapmle topp[COLOR="Red"]ed[/COLOR],pen[COLOR="Red"]s[/COLOR],remote[COLOR="Red"]s[/COLOR] however i have to check by first checking the first string boy and i throw it away … | |
Hi all, I am having some problem writing an ImageJ plugin for display image histogram. [CODE]import ij.ImagePlus; import ij.plugin.filter.PlugInFilter; import ij.process.ByteProcessor; import ij.process.ImageProcessor; public class Create_New_Image implements PlugInFilter { String title = null; public int setup(String arg, ImagePlus im) { title = im.getTitle(); return DOES_8G + NO_CHANGES; } public void … | |
I can turn on anti-aliasing, but whenever I draw stuff the arguments are still ints, not floats or doubles. How can I change this? | |
Well i intended to develop a sohisticated java server client program . but just couldnt push myself so far so ust had to satisfy myself with it. Well , i have created a simple chatting interface . i would not call it a chatting interface actually cuz i had something … | |
Hi! When I try to run the code [ICODE]tableModel.setQuery("select l_code, l_title, l_description from Lists");[/ICODE], then I receive the following error: [CODE] java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 at java.util.Vector.elementAt(Vector.java:427) at SystClasses.QueryTableModel.getValueAt(QueryTableModel.java:72) at SystClasses.QueryTableModel.getColumnClass(QueryTableModel.java:53) at javax.swing.table.TableRowSorter.useToString(TableRowSorter.java:224) at javax.swing.DefaultRowSorter.updateUseToString(DefaultRowSorter.java:607) at javax.swing.DefaultRowSorter.sort(DefaultRowSorter.java:556) at javax.swing.DefaultRowSorter.allChanged(DefaultRowSorter.java:816) at javax.swing.DefaultRowSorter.modelStructureChanged(DefaultRowSorter.java:826) at javax.swing.JTable.tableChanged(JTable.java:4364) at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280) at SystClasses.QueryTableModel.setQuery(QueryTableModel.java:110) at SystClasses.Form.createAdminTable(Form.java:747) at … | |
Hello all, is that possible to help me out with Error Checking for user input? I am developing a peg solitaire program and now need a error checking for user input or for input file. Either use try and catch.. or making another method.. can anyone give a me a … |
The End.