User Profile

Collapse

Profile Sidebar

Collapse
porky008
porky008
Last Activity: Nov 24 '06, 04:12 AM
Joined: Oct 20 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • porky008
    started a topic search button
    in Java

    search button

    I have this search button working for the most part. I would like it if some one could take a look at it and let me know what I am doing wrong it though. Basically I want it to display movie not found if the movie is not found and can not seem to get it right.

    Code:
     btnSearch.addActionListener(new ActionListener(){
    		  public void actionPerformed(ActionEvent ae){
    			  String Search =JOptionPane.showInputDialog("Enter
    ...
    See more | Go to post

  • porky008
    started a topic adding a search button
    in Java

    adding a search button

    I need to add a search button to this and have no clue how to do it. Can some one please help me on this?
    Code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.JFrame.*;
    
    
    class Testing
    {
      java.util.List<DVD> dvds = new java.util.ArrayList<DVD>();
     
      JTextField tfTitle = new JTextField(5);
    ...
    See more | Go to post

  • porky008
    replied to JButton question
    in Java
    thank you now i just have to re-read the book to see if i can find the value of the last item.
    See more | Go to post

    Leave a comment:


  • porky008
    replied to JButton question
    in Java
    Thank you thank you. My next question is how would I add a button that goes to the last or first item? I have not been able to figure that part out.
    See more | Go to post

    Leave a comment:


  • porky008
    started a topic JButton question
    in Java

    JButton question

    I put in a next and previous button but it crashes when I run it. I also need it to loop around to the first or last if at the ends. Can some one help me with this?

    Code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.JFrame.*;
    import java.io.*;
    
    class Testing
    {
      java.util.List<DVD> dvds = new java.util.ArrayList<DVD>();
    ...
    See more | Go to post

  • porky008
    started a topic gui help
    in Java

    gui help

    I got this much done but still need to display the value and a restocking fee of 5% and can not figure out how to add it. Can some one help me on this?
    Code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    class Testing
    {
      java.util.List dvds = new java.util.ArrayList();
     
      JTextField tfTitle = new JTextField(15);
      JTextField tfProductNumber
    ...
    See more | Go to post

  • porky008
    replied to subclass confusion
    in Java
    this is what i have and i can not seem to get the re-stocking fee to work. can i please get some help fixing this. thanks
    Code:
    public class inventorysupplystock2 implements Comparable{
             protected  int count;
             protected  int quantity;
             protected  String productName;
             protected  String productGenre;
             protected  double itemNumber;
             protected  double quantityNumber;
    ...
    See more | Go to post

    Leave a comment:


  • porky008
    replied to subclass confusion
    in Java
    I need to add a restocking fee of 5% to this inventory program. I can not seem to get the coding for it right....
    See more | Go to post

    Leave a comment:


  • porky008
    replied to subclass confusion
    in Java
    I got the errors worked out but I still can not get the restocking fee working....
    See more | Go to post

    Leave a comment:


  • porky008
    replied to subclass confusion
    in Java
    This is what I have to do modify the inventory program by creating a subclass of product class that uses one additional unique feature of the product you choose (for the DVDs subclass you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a %5 restocking fee to the value...
    See more | Go to post

    Leave a comment:


  • porky008
    replied to subclass confusion
    in Java
    all i know u he said "You do not need to use the extends keyword. The file with the static void main will call the otherfile.java into existence via the =New keyword." so i am very ocnfused now about how to add this subclass...
    See more | Go to post

    Leave a comment:


  • porky008
    started a topic subclass confusion
    in Java

    subclass confusion

    I need to make a subclass for the following code. I was planning on using the extends keyword but the instructor says to use =new keyword. I do not understand the = new keyword. Can someone please explain the difference and possibly provide an example based on the following code.
    Code:
     import java.util.Scanner;
    
    public class inventorysupplys2 { // start of class
    
    
        public static void main(String[] args) {
    ...
    See more | Go to post

  • porky008
    replied to help with an array
    in Java
    Cool thank you for the help on getting the total to show up....
    See more | Go to post

    Leave a comment:


  • porky008
    started a topic help with an array
    in Java

    help with an array

    I can not figure out how to use an array to store the different things and the total is only showing 0.0 instead of the total of the inventory. Can I please get some help on this?
    Code:
    // This calls the external class scanner 
    import java.util.Scanner; 
    
     class inventory
    { // start of class
    
           // Variable Declaration 
         private String productname;       // name of movie
    ...
    See more | Go to post

  • porky008
    replied to arrays
    in Java
    thanks for the help. now to hope it can figure it out
    See more | Go to post

    Leave a comment:


  • porky008
    started a topic arrays
    in Java

    arrays

    I kind of understand how arrays work. The part I can not figure out is how to make it so the user enters the input and not me. I have not been able to find anything on how to get the user to put in something like the name of a movie and some other info so it can be stored and brought up latter. Can some one point me in the right direction please?
    See more | Go to post

  • porky008
    replied to help on simple problem
    in Java
    I can't seem to find what is wrong with this. I know a lot is wrong
    by the amounts of errors that are popping up but I can't seem to find
    a way to fix them. Can some one please help with my stupid mistakes?
    Thanks
    Code:
     import java.util.Scanner; 
     class Employee 
    { 
    
    
       private double payrate; 
       private double hoursworked; 
       private String name = "blanknow";
    ...
    See more | Go to post

    Leave a comment:


  • porky008
    replied to help on simple problem
    in Java
    Now I fell like an idiot, yes that’s what I forgot. Thanks...
    See more | Go to post

    Leave a comment:


  • porky008
    replied to help on simple problem
    in Java
    I did this but there is still somthing that I can not get right
    Code:
     public class Payroll3
     { // start Payroll3
     	public static void main( String args[])
     	{
     		Employee n = new Employee();
     		
     		n.showName();
     		n.showpayRate();
     		n.showHours();
     	}
     } // end Payroll3
    What am I missing?...
    See more | Go to post

    Leave a comment:


  • porky008
    started a topic help on simple problem
    in Java

    help on simple problem

    I need to modify the following program so that it uses a class to store
    and retrieve the employee's name, the hourly rate, and the number of
    hours worked. Use a constructor to initialize the employee information,
    and a method within that class to calculate the weekly pay. For some
    reason Icant seem to grasp this simple task. Can some plese help me
    out on this? Thanks

    import java.util.Scann er;...
    See more | Go to post
No activity results to display
Show More
Working...