Chase Becicka

Greenhorn
+ Follow
since Feb 16, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chase Becicka

I am attempting to Build an application using JScrollPane for the first time, However I am unable to acctually create a scroll pane in my GUI, every time I try all i get is a downward indent in the middle of my JPanel so if anyone knows of any components that would be easier to use for displaying account information in nice defined rows please tell me or if you canget my scroll pane working that would be awesome

19 years ago
Does anyone know how I can make my java files an executable source file outta my java code I just want to be able to double click on the file and let it run
19 years ago
I'm not sure what you mean by having two object statments, but how would that work and if I were pulling info outta the database how would that work for the code below I just pasted below assuming that lets say 1/2 of the items I was trying to set were for a different table

I have a problem with setting up my result set and when I query the database, I have two tables and they are linked by a common column name so I have to designate which one I call to the but when I set my second query to the second table I get a query already open error, because I queryed the first tables so how do I combine the two queries into one but avoid the problem of the Column with the same name, (The columns needs to be the same so changing them isn't an option)

I am having a problem being able to get my botton Jbuttons to allign properly, they are just lined up in a row at the bottom of my JFrame but I want it to appear more like

NextCust NextAcct Search
Add Update Delete Exit


19 years ago
I can't seem to get my searchPanel to show up on my JFrame and I don't know why, its not conflicting with any other JFrames and also I wished to know that lets say I added a second Panel to the south region of the boarder layout how would I get that layout to display nicly with the other???

[ December 13, 2004: Message edited by: Chase Becicka ]
19 years ago
I am attempting to Transform an old Inventory Program into a banking Program as to save time writing a new program, its made up of three files a GUI, a controller (db and GUI middle man) and a db connection. I have almost everything working except a few errors in my GUI on my performGameDisplay method,I don't get why its giving me these errors because the variables that are producing the syntax problem are correctly declared in the other two files ive rewrote them a few times as to make sure I didnt have incompatable datatypes or something, so please if anyone knows why my variables arn't getting along with the compiler or if you know of any good refernces such as online tutorials I could refer to that would be a great help Heres my Code

19 years ago
Okay I can see my JFrame now but I can't see my panels I created unless I resize my JFrame but I don't want my JFrame to be resizeable in the end. Should I just switch to a easier Layout Manager or is there an easy fix

what I am trying to get this to do is go gown vertically like this

Label TF
Label TF
Label TF

ect.


Heres the cod eupdated again
19 years ago
I have been trying to figure out why when I execute this code all I get is a little bar at the top of the screen without any of my Labels or Buttons please help with a debug



import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;

public class inventFrame extends JFrame
{
public void BankingGUIFrame()
{
setTitle("Teller Program");
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension d = tk.getScreenSize();
int height = 200;
int width = 267;
setBounds((d.width-width)/2, (d.height-height)/2, width, height);
setResizable(true);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
Container contentPane = getContentPane();
JPanel panel = new BankingGUIPanel();
contentPane.add(panel);
}


public static void main(String[] args)
{
JFrame frame = new inventFrame();
frame.show();
}
}


class BankingGUIPanel extends JPanel implements ActionListener
{
private JTextField custNumTF, custNameFTF, custNameMITF, custNameLTF;
private JLabel custNumL, custNameFL, custNameMIL, custNameLL;
private JButton exitButton;


public BankingGUIPanel()
{
JPanel displayPanel = new JPanel();
displayPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));

custNumL = new JLabel("Customer Number: ");
custNameFL = new JLabel("First Name: ");
custNameMIL = new JLabel("Middle Inital: ");
custNameLL = new JLabel("Last Name: ");

custNumTF = new JTextField(10);
custNameFTF = new JTextField(10);
custNameMITF = new JTextField(10);
custNameLTF = new JTextField(10);

displayPanel.add(custNumL);
displayPanel.add(custNumTF);
displayPanel.add(custNameFL);
displayPanel.add(custNameFTF);
displayPanel.add(custNameMIL);
displayPanel.add(custNameMITF);
displayPanel.add(custNameLL);
displayPanel.add(custNameLTF);

JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
exitButton = new JButton("Exit");
buttonPanel.add(exitButton);

exitButton.addActionListener(this);

setLayout(new BorderLayout());
add(displayPanel, BorderLayout.CENTER);
add(buttonPanel, BorderLayout.SOUTH);
}
public void actionPerformed(ActionEvent e)
{
Object source = e.getSource();

if (source == exitButton)
System.exit(0);

}



}
19 years ago
I am using SQL Server and I have two tables that I joined with one common named column which is the primary key value on both tables

the code i am using to connect is

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc dbc:javaBank";
String user = "sa";
String password = "";
connection = DriverManager.getConnection(url, user, password);

I have three files going my GUI file my connectDB file which is where I got the code above and I am trying to write a file that gets the info from the connectDB file and gives it to the methods in my inventGUI file put as I said I don't know how to get data from the columns once I connect
19 years ago
I'm using a database for the first time and am trying to extract the columns I created I can make the connection but I can't figure out how to get the columns I have out and then get them assigned to appropriate variables any code examples or weblinks would be much appriciated
19 years ago
Well my data tables do have one common column, its set up like this,

my custNum is a column on both tables I have and the second table cannot exsist without a mathcing value in the first table so the CustNum links the two tables togeather and is the primary key for both tables
I just have a quick question with connecting to multiple tables, This is the first time I have attempted to code with a database cotaining multiple tables, is there anything special I need to do access the second table within my database or can I still just throw out the column name to connect to the resultset in that table
I'm trying to run a batch file from a method in java? so would the Runtime.exec().work???
I just have a question with know wheather or not you can get your java program to run a batch file that will hook up an Access or SQL server database in your program

For Example

run file setup.bat

So basically I want the ODBC connection to be established through the running of a method on the program so if a user is taking my app he can just click it open on for the first time on his comp, then the connection is just their assuming hes running Access or SQL Server

Any help would be greatly appriciated and if you need me to restate the problem please ask