Search:

Type: Posts; User: jocdrew21

Page 1 of 8 1 2 3 4

Search: Search took 0.25 seconds.

  1. Replies
    9
    Views
    116

    Re: Adding Panels to JFrame

    I looked into MigLayout and got pretty excited. However I am getting some funny errors.



    There was an error java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Add...
  2. Thread: Line Spacing

    by jocdrew21
    Replies
    3
    Views
    63

    Re: Line Spacing

    Create a loop
    System.out.print(); will not make a new line, unless you add \n of course.
    System.out.println(); Will create a new line.

    Then simply right out your loop.

    There are lots of...
  3. Replies
    9
    Views
    116

    Re: Adding Panels to JFrame

    MigLayout? I will look more into it. I started to use GredBagConstraints and it is not doing what I want either, this is that I have:



    package addItemBtn.Home.DataBase;

    import...
  4. Replies
    9
    Views
    116

    Re: Adding Panels to JFrame

    I am trying a new approach, putting a panel inside a panel then adding then adding that panel to the JFrame using GridBagConstraints which I named c.



    //add buttons to panel...
  5. Replies
    9
    Views
    116

    Re: Adding Panels to JFrame

    I might have been over thinking it. I am thinking I need GroupLayout() for the JFrame and for each panel I will use different layout managers... Am I on the right track now?
  6. Replies
    9
    Views
    116

    Re: Adding Panels to JFrame

    I was reading an found I could use setBounds. This is doing some WACKY things, is there that are doing something similar to what I am doing. Here is my updated code, but I will tell you what I...
  7. Re: if else statement: I need to place a price in a variable: to later ad taxes and topping to final cost.

    Norm I just cute a pasted his code showing him what it should look like. Obviously once he does that from his JDK it will naturally do it for him. Correct?
  8. Re: if else statement: I need to place a price in a variable: to later ad taxes and topping to final cost.

    Your code should look like this and please ask a direct question:



    package lab_3;

    /**
    This program allows the user to order a pizza
    */
    import java.util.Scanner;
  9. Replies
    9
    Views
    116

    Adding Panels to JFrame

    I added a few JPanels to a JFrame. Want I wanted is the JTextFields to be on the top right, the buttons to be on the bottom and the JFileChooser to be on the top right. Lastly I wanted the JTextArea...
  10. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    Ok got it...

    I was calling the addItemView class inside the constructor, so naturally it was going to open right away. I took it out and created a new instance of the class inside the else if...
  11. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    No here is that class....



    package mainMenu.Home.DataBase;

    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.sql.Connection;
  12. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    package mainMenu.Home.DataBase;

    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;

    import addItemBtn.Home.DataBase.AddItemView;

    public class StartUpMenuController
    {...
  13. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    It runs now, but opens the new frame right away without me ever hitting the button. Even weirder I am call a method that has nothing in it.
    This:


    else if(e.getSource()==menu.addBtn)
    {...
  14. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    Good point and fixed it but still having the same issue.



    public class StartUpMenuController
    {
    StartUpMenu menu;
    AddItemView addItemView;

    StartUpMenuController(StartUpMenu menu,...
  15. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    addItem is a class but it is a instance of the class AddItemView(). I am simply trying to call the constructor which holds all the info for the new frame in order for the user to enter a item into...
  16. Replies
    15
    Views
    106

    [SOLVED] Re: Frame not displaying:

    Holly Molly it does run, and the frame looks like total crap which is why I am testing it. I just hint proceed anyway when eclipse warned me.

    Change to AddItemModel
    Change to AddItemView
    Create...
  17. Replies
    15
    Views
    106

    [SOLVED] Frame not displaying:

    Below is the code I am having a issue with. I created a instance of a class AddItemView, inside StartUpMenuController. I then passed it into the class, the main method is below showing that as well....
  18. Replies
    2
    Views
    67

    storing images mySQL using java swing

    I am making a database, not a very big one, it has 5 tables. I want to store an image on the database but I have been reading this is bad practice. However it fails to say why, and what is the better...
  19. Replies
    7
    Views
    94

    Re: JAVA SQL Connection

    Looks like you are using SQL and not mySQL right.
    Microsoft JDBC Driver for SQL Server

    Once you download the driver, open it and find the jar file. Right click the file you are using and select...
  20. Re: changed packages, now it will not run:

    Please do explain here. I have been taught modularity is a key concept of Java. I am making a different database for my house, so that I know where everything is, storing pictures, their location...
  21. Replies
    7
    Views
    94

    Re: JAVA SQL Connection

    do you have the driver set on the class path?
  22. changed packages, now it will not run:

    I did have all my classes in one package and it just look ugly. So I made a package for each button using MVC design pattern and now it much easier to understand. However now it will not run. I...
  23. Re: launching a application to look like a web page

    I would need to use JavaEE for that right?
  24. launching a application to look like a web page

    I have been working on a home database just to get more conforatble with things and someone stumbed me with a question. I was asked why I choose swing and why I did launch it on a server to make it...
  25. Replies
    3
    Views
    99

    Re: Connecting to a database:

    Ok I fixed that now it just repeats the query back to me. I want it to execute it:



    Database Established…
    com.mysql.jdbc.JDBC4PreparedStatement@24599bcd: SELECT * FROM `users` WHERE ...
Results 1 to 25 of 179
Page 1 of 8 1 2 3 4