User Profile

Collapse

Profile Sidebar

Collapse
jpenguin
jpenguin
Last Activity: May 11 '10, 11:26 PM
Joined: Aug 28 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jpenguin
    replied to dismiss modal JDialog
    in Java
    :solved:

    Code:
    	public void endGame(){
    		Frame f = findParentFrame(); 
    		final JDialog dialog = new JDialog(f, "Game Over", true);
    			JButton close = new JButton("Play Again");
    		if (counter_black > counter_white) {
    			dialog.setLayout(new GridLayout(2, 1));
    			dialog.add( new Label("You\nWon!") );
    			dialog.add( close );
    			//dialog.pack();
    ...
    See more | Go to post

    Leave a comment:


  • Well I think java & C++ are good to know. I'm against .NET (M$)
    See more | Go to post

    Leave a comment:


  • jpenguin
    started a topic dismiss modal JDialog
    in Java

    dismiss modal JDialog

    I am coding a reversi game as a java applet. I am using modal dialogs to inform the user if they beet the computer. I can close the dialog by the window decorations 'close', I want to hide the decoration and have my own close button-

    Code:
    import java.applet.*;
    import java.lang.*;
    import javax.swing.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    ...
    See more | Go to post

  • jpenguin
    replied to setWidth string
    in Java
    thanks, that was driving me crazy.

    I set my JOptionPanes to use a MonoSpace font, and everthing lines up! :-)
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to setWidth string
    in Java
    PS-- I'm pretty sure teacher doesn't expect us to do any HTML

    Java Programming, 3rd Edition, ISBN 1-4239-0135-5
    By DS Malik, Published by Thomson Course Technology
    Chap 3
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to setWidth string
    in Java
    yep, I did try '\t', but as I found, it didn't work.

    I was almost certain that the
    Code:
    String.format("%-40s",[B][I]string[/I][/B])
    would have made each string take a length of 40. Could you tell me why it doesn't?
    See more | Go to post

    Leave a comment:


  • jpenguin
    started a topic setWidth string
    in Java

    setWidth string

    I'm doing a simple program to learn java. I have the input and math parts right. It just isn't displaying right. It outputs a list of about 11 things-- with the format "string $ xx.xx"
    In each line the '$'s should be aligned and the decimal point should be aligned.

    This is what it currently shows-
    Code:
    package excercise6;
        import java.swing.*;
    /**
     *
     * @author dye1107
     */
    ...
    See more | Go to post

  • jpenguin
    replied to Create table
    LOL, I can't believe I did that :-)
    See more | Go to post

    Leave a comment:


  • jpenguin
    started a topic Create table

    Create table

    My site is being hosted on www.110mb.com
    I tried to fallow an online tutorial, but I still get e rrors

    Code:
    <?php
    // Make a MySQL Connection
    mysql_connect("localhost", "jpenguin_root", "*******") or die(mysql_error());
    mysql_select_db("jpenguin_brain") or die(mysql_error());
    
    // Create a MySQL table in the selected database
    mysql_query("CREATE
    ...
    See more | Go to post

  • jpenguin
    started a topic HTML form --> MySQL

    HTML form --> MySQL

    This should be simple, but I'm stuck

    Code:
    <?php
    $con = mysql_connect("localhost","root","");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db('joshdye', $con);
    
    $winner = mysql_real_escape_string($_POST['winner']);  
    $loser = mysql_real_escape_string($_POST['loser']);  
    $num = mysql_real_escape_string($_POST['games']);
    ...
    See more | Go to post

  • jpenguin
    started a topic list files in ftp based on extention
    in C

    list files in ftp based on extention

    So, I've done quite abit of searching, but the only ftp libs I can find are for windows; need one that is platform to do something like this

    Code:
    for (int num; !end-of-ftp-directory-list; num++)
    {
         filename = ftpfile[num];
         if (filename.extension== "tbz")
         {
              cout >> filname >> "\n";
         }
    )
    I am coding this for an open-source...
    See more | Go to post

  • jpenguin
    replied to Upload Script
    in PHP
    nevermind, I got it!

    Thanks for all your help
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to Upload Script
    in PHP
    So I'm just about done. I am trying to save some info ther enters in a txt file, I actually have a function for that, but I can't get the name the way I want it nor save it in the right spot; if the user uploads "mytrack.tb z", the text file should be named "mytrack.tx t" and it should go in the same directory as the uploaded .tbz

    My HTML code-
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    ...
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to Upload Script
    in PHP
    Your write, I already have APACHE, I just need to get PHP; then I'll test the code.
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to Upload Script
    in PHP
    Thanks for all your help., I think I've got something that will work. Of coarse I have no way of testing it yet, so for all I know it could crash and burn.
    I'll have to wait for replies from the project developers to see where we should store info like names (after all they have to be able to write C++ code that can retrieve it).

    So now I want to know what the best way to display info specific to karts or tracks; If they select...
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to Upload Script
    in PHP
    1. I'm sorry I wasn't very clear; I', trying to learn basic PHP and thought this would be a good project to learn on. I've been doing some reading online, but don't get how I can create a drop-down menu suited for my use, because I've found so many complete different examples online.
    1.1 Right now I have the file type checking, what I need in it is a place where the user can select "kart or track"

    2. CC-BY is...
    See more | Go to post

    Leave a comment:


  • jpenguin
    replied to 403 forbidden error
    in PHP
    I find that it is easy for permissions to become corrupted; do a
    Code:
    CHMOD  -R 777
    (or 775) on your upload folder
    See more | Go to post

    Leave a comment:


  • jpenguin
    started a topic Upload Script
    in PHP

    Upload Script

    Hi, I'm creating a upload form for an open-source games track and kart repos. Basically I'm trying to code a upload form that allows user to select, from a pop-up menu, if they are uploading a kart or a track; then they select the file (File MUST be gziped or bziped). If they choose that the file is a kart, the file will be uploaded in ./karts,; if a track, it will be uploaded in ./tracks.
    So I did some searching on the internet, and coded...
    See more | Go to post

  • jpenguin
    replied to QT GUI Toolkit: beginer
    in C
    I got help on another forum

    :closed:
    See more | Go to post

    Leave a comment:


  • jpenguin
    started a topic QT GUI Toolkit: beginer
    in C

    QT GUI Toolkit: beginer

    So I am learning QT. But I can't seem to ge past 2 errors that seem to make no sense to me, "error "ui" was not declared in this scope". what get me is that I have the same thing on the next line, but no error...

    simplecalc.cpp
    Code:
    #include <QtGui> 
     #include <QMessageBox>  
    #include "simplecalc.h"   
    //using namespace UI; 
    simplecalc::simplecalc(QWidget *parent)
    ...
    See more | Go to post
No activity results to display
Show More
Working...