<< Prev Showing: 241-245 of 348 Next >>
· 216-220 · 221-225 · 226-230 · 231-235 · 236-240 · 241-245 · 246-250 · 251-255 · 256-260 · 261-265 · 266-270 ·As many of the other individuals submitting problems, I too have an issue with my Java programming. My current dilemma is: Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item should display. Here is the program I have thus far and compiles nicely.
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128812
OTA ID:
102833
I have a question about something that has puzzled me. I did this on my program because it was how I saw it done. I was wondering if someone could explain why it is done this way and if I would do this for all ActionEvents. I used the following code. What does the ".getSource()" do? Is that what registers when someone clicks the button? How would this format change if I was adding data entered into a text field? Any help is much appreciated!! :) ******** public void actionPerformed(ActionEvent e) { if (e.getSource() == b) { b.setText("Clicked"); click++; if (click == 1) b.setText("I've been clicked!"); else b.setText("I've been clicked " + click + " times!"); }... click for more
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128850
OTA ID:
101298
Can you explain the components of this code for me? javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { new testEvents(); Basically, when I read this code, I just want to know how it works, what it does, when would I use this, would I use it every time, etc. Thanks!
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128863
OTA ID:
101298
Write a program that merges two ordered-list objects of integers into a single ordered-list object of integers. Method merge of class ListMerge should receive references to each of the list objects to be merged and return a reference to the merged list object. Tips: http://www.engineering.uiowa.edu/~swd/LectureNotes/JavaHTP6e_17.pdf
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
129549
OTA ID:
101298
State whether each of the following is true or false. If false, explain why. a) Method sleep does not consume processor time while a thread sleeps. b) Using a Lock guarantees that deadlock cannot occur. c) Once a Lock has been obtained by a thread, the Lock object will not allow another thread to obtain the lock until the first thread releases it. d) Swing components are thread safe. Tips: http://www.horstmann.com/corejava/cj7v2ch1.pdf
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
129581
OTA ID:
101298
<< Prev Showing: 241-245 of 348 Next >>
· 1-5 · 6-10 · 11-15 · 16-20 · 21-25 · 26-30 · 31-35 · 36-40 · 41-45 · 46-50 · 51-55 · 56-60 · 61-65 · 66-70 · 71-75 · 76-80 · 81-85 · 86-90 · 91-95 · 96-100 · 101-105 · 106-110 · 111-115 · 116-120 · 121-125 · 126-130 · 131-135 · 136-140 · 141-145 · 146-150 · 151-155 · 156-160 · 161-165 · 166-170 · 171-175 · 176-180 · 181-185 · 186-190 · 191-195 · 196-200 · 201-205 · 206-210 · 211-215 · 216-220 · 221-225 · 226-230 · 231-235 · 236-240 · 241-245 · 246-250 · 251-255 · 256-260 · 261-265 · 266-270 · 271-275 · 276-280 · 281-285 · 286-290 · 291-295 · 296-300 · 301-305 · 306-310 · 311-315 · 316-320 · 321-325 · 326-330 · 331-335 · 336-340 · 341-345 · 346-348 ·Page generated in 0.0965 seconds