g00se's Profile User Rating: *****

Reputation: 2735 Guru
Group:
Mentors
Active Posts:
11,520 (5.23 per day)
Joined:
20-September 08
Profile Views:
32,481
Last Active:
User is offline Today, 04:11 PM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Expert In:
Java

Latest Visitors

Icon   g00se has not set their status

Posts I've Made

  1. In Topic: Help with SecureRandom program

    Posted 1 Oct 2014

    Quote

    Well we were told that the negative binary numbers are OKAY.


    There's a bit of confusion here: they're not negative binary numbers but simply byte values exhibiting their natural property of being signed
  2. In Topic: How to set (minimum) panel size for panel with a Graphics2D object?

    Posted 1 Oct 2014

    You need to set minimum and probably preferred sizes:

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    
    import java.io.*;
    
    import java.util.*;
    
    import javax.swing.*;
    
    
    public class SudokuPanel extends JPanel {
        final int X_OFFSET = 10;
        final int Y_OFFSET = 10;
        final int WIDTH = 30;
        final int HEIGHT = 30;
        final float LIGHTSTROKE = 1.0f;
        final float BOLDSTROKE = 2.0f;
    
        public SudokuPanel() {
            int x = (9 * WIDTH) + (2 * X_OFFSET);
            int y = (9 * HEIGHT) + (2 * Y_OFFSET);
            Dimension d = new Dimension(x, y);
            setPreferredSize(d);
            setMinimumSize(d);
        }
    
        public void paintComponent(Graphics comp) {
            Graphics2D comp2D = (Graphics2D) comp;
            comp2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
            comp2D.setColor(Color.black);
    
            for (int x = 0; x < 9; x++) {
                for (int y = 0; y < 9; y++) {
                    int xPos = X_OFFSET + (x * WIDTH);
                    int yPos = Y_OFFSET + (y * HEIGHT);
                    comp2D.setStroke(new BasicStroke(LIGHTSTROKE,
                            BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
                    comp2D.draw(new Rectangle2D.Double(xPos, yPos, WIDTH, HEIGHT));
    
                    if (((x % 3) == 0) && ((y % 3) == 0)) {
                        comp2D.setStroke(new BasicStroke(BOLDSTROKE,
                                BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
                        comp2D.draw(new Rectangle2D.Double(xPos, yPos, WIDTH * 3,
                                HEIGHT * 3));
                    }
                }
            }
        }
    }
    
  3. In Topic: usb in Java

    Posted 1 Oct 2014

    If you've 'bricked' it, then how do expect you'll be able to connect to it via USB (which would depend on a properly working OS)?
  4. In Topic: Help in Progress Bar

    Posted 1 Oct 2014

    Use a ProgressMonitorInputStream
    http://docs.oracle.c...s/progress.html
  5. In Topic: Is this right?

    Posted 1 Oct 2014

    Quote

    Is my code right for this pseudocode


    Well of course, one of the first tests (though not necessarily the last) is - does it compile? It won't. The compiler will tell you why not

My Information

Member Title:
D.I.C Lover
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private
Website URL:
Website URL  http://technojeeves.com

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    reznum Icon

    19 Jul 2014 - 07:21
    Amazing guy
    Really appreciate your help :)
  2. Photo

    Nageshvk Icon

    28 Feb 2014 - 07:57
    can any body tell in Java SWINGS when do RepaintManager.scheduleProcessingRunnable() method is called? I am getting NPE while running the applet in JRE 1.7.51
  3. Photo

    john111 Icon

    27 Feb 2014 - 09:57
    any chance you can help me pleasee:
    http://www.dreamincode.net/forums/topic/341051-java-applet-creating-bar-chart-from-user-input/
  4. Photo

    trixt.er Icon

    30 Dec 2013 - 10:13
    *avatar image
  5. Photo

    trixt.er Icon

    30 Dec 2013 - 10:13
    Hey g00se why doesn't your avatar show up in your profile, but it does in your posts?
  6. Photo

    trixt.er Icon

    30 Dec 2013 - 08:12
    g00se be my friend! :)
  7. Photo

    nishakantsharma Icon

    07 Oct 2013 - 01:28
    how to remokve space between div tags
  8. Photo

    Anitush Icon

    21 Aug 2013 - 06:37
    hey could you help on my topic External Methods or error in code under Java pretty please. Thanks
  9. Photo

    Abomosa Icon

    20 Apr 2013 - 15:33
    can you help me more in my program
    http://www.dreamincode.net/forums/topic/319095-calculate-average-using-method/
  10. Photo

    Abomosa Icon

    20 Apr 2013 - 15:25
    http://www.dreamincode.net/forums/topic/319095-calculate-average-using-method/page__gopid__1839513&#entry1839513
  11. Photo

    raghav.naganathan Icon

    09 Dec 2012 - 09:41
    Congrats on the 1800 :)
  12. Photo

    raghav.naganathan Icon

    21 Nov 2012 - 04:48
    Dude, your rep just crossed the Hardy Ramanujan number(1729) :) Cheers :)
  13. Photo

    JeffBurnsRed Icon

    14 Nov 2012 - 07:10
    Thanks for all of your help
  14. Photo

    TheCodeNoob Icon

    28 Sep 2012 - 03:49
    You are useless and you should feel useless.
  15. Photo

    GameDesigner34 Icon

    31 Aug 2012 - 18:58
    Thank you so much for your help. I finished my program and you were the best at helping me.
  • (2 Pages)
  • +
  • 1
  • 2