User Profile

Collapse

Profile Sidebar

Collapse
lost1
lost1
Last Activity: Dec 13 '07, 04:38 PM
Joined: Oct 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lost1
    replied to ResultSet ScrollPane problem
    in Java
    outside of my comment do you see anyhting wrong with the second block of code I posted? I don't have time to rewrite this, but if I cna't fix what I have I'll try.
    See more | Go to post

    Leave a comment:


  • lost1
    replied to ResultSet ScrollPane problem
    in Java
    unfortunately I'm under a little bit of a time crunch and this is the last part of this code and I'm stuck. I guess what I mean by error is that fact that I simply don't know how to get the result set to print in the scroll pane.

    Code:
                final String UserInput = SearchText.getText();
     
                SearchButton.addActionListener(new ActionListener()
                    {
                        public void actionPerformed(ActionEvent
    ...
    See more | Go to post
    Last edited by lost1; Dec 13 '07, 04:19 PM. Reason: added code that is focus of problem

    Leave a comment:


  • lost1
    started a topic ResultSet ScrollPane problem
    in Java

    ResultSet ScrollPane problem

    I am having trouble adding a result set to a scroll pane. no matter what I do using getText I get an error. Can someon give me a clue?

    Code:
    import java.util.*;
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.DefaultTableModel;
    
    public class MusicLibraryForm extends JFrame
    {
    ...
    See more | Go to post

  • lost1
    replied to Triangle type issue
    in Java
    I tried changing triangleType to private and I get an error and the same result "null". How do I go about making it private? Yeah, I know you change public to private, but I apparently can't do anything right with this....
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    Ok I put everything in one application to make it easier to deal with and I updated my if statements. Based on what I have below can you show me how to fix this so the method call gives me the triangle type instead of "null"?

    Code:
    import java.util.Scanner;
    
    class triangle
    {
    //instance variables
        int side1;
        int side2;
        int side3;
        String triangleType;
    ...
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    Here's the code for the triangle

    Code:
    class triangle
    {
    //instance variables
        int Side1;
        int Side2;
        int Side3;
        String triangleType;
    
    //constructor method for the three sides of the triangle
        triangle(int s1, int s2, int s3)
        {
            Side1 = s1;
            Side2 = s2;
            Side3 = s3;
        }
    
    //instance method
    ...
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    The user is prompted to enter three integers in a test class, this test class has the main method and executes what I'm trying to figure out.

    Where is the syntax am I calling the function instead of the method? I'm not going to pick up on this unless someone shows me and lets me apply it to my own. I don't understand.

    #3 is the reason I was here. I don't know how to call the method properly. I'm new to this....
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    What should work? The method call doesn't work, no matter what numbers I enter or what order I enter them in. I've put in 10, 10 and 10 and gotten "null"

    both the class and the test class compile without a problem, I just don't know how to fix the "null" print out....
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    Yeah, I could add more if statements to make sure I dont get errors.

    I need help calling the triangleType method to print the type instead of "null"
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    if only 2 of the sides are equal it's an Isoscelese triangle. I'm losing focus from my original question....
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    It's giving the if statements for the sides of an instance of a triangle and giving the correspsonding triangle type based on those if statements after the user inputs all 3 integers. I'm not worried about negative numbers or error checking right now. There are three type of triangles. 3 sides equal: Equilateral, 2 sides equal: Isoscelese and no sides equal: Scalene....
    See more | Go to post

    Leave a comment:


  • lost1
    replied to Triangle type issue
    in Java
    How's this?

    Code:
    class triangle
    {
    //instance variables
        int Side1;
        int Side2;
        int Side3;
        String triangleType;
    
    //constructor method for the three sides of the triangle
        triangle(int s1, int s2, int s3)
        {
            Side1 = s1;
            Side2 = s2;
            Side3 = s3;
        }
    
    //instance method to determine the
    ...
    See more | Go to post

    Leave a comment:


  • lost1
    started a topic Triangle type issue
    in Java

    Triangle type issue

    Can someone point me in the right direction on how to get the triangle type to display. Below is a triangle class that is tested by another completely separate class. The main method of the test class executes the code you see below. What I'm trying to figure out is what I'm doing wrong in getting the triangle type to print. the integers typed in by the user print fine, but I keep getting "null" for the triangle type because I don't...
    See more | Go to post

  • lost1
    started a topic user input
    in Java

    user input

    I have prompr the user to enter three seperate values for the sides of a triangle. I know how to ask the user to input one value, but not multiples. Any help would be appreciated.

    Code:
    import javax.swing.JOptionPane;
    
    public class whatever
    
        public static void main(String [] args)
        {
            String input = JOptionPane.showInputDialog("Enter number here:");
    ...
    See more | Go to post
    Last edited by lost1; Oct 1 '07, 12:53 AM. Reason: poor spelling and clarification.
No activity results to display
Show More
Working...