Search:

Type: Posts; User: beer-in-box

Page 1 of 4 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    8
    Views
    267

    Re: Static methods and variables

    It can change over time, but what I meant was it is the same for every class at any given time, right? Until one of the classes changes its value...
  2. Replies
    8
    Views
    267

    Re: Static methods and variables

    :D Thanks. That was soo clear :)
  3. Replies
    8
    Views
    267

    Re: Static methods and variables

    Hmm... I guess I could use some static methods in some of my apps...

    How does this compare to usual method in terms of performance and resource consuming?
  4. Replies
    8
    Views
    267

    Static methods and variables

    Hi,

    Lately I've developed an interest in game developing and chosen libgdx as my library. So I was collecting resources and reading them. Someone gave me a link to a video (sadly I lost it with...
  5. Replies
    2
    Views
    497

    Re: Separate Event Handler Class

    Thanks for the tips!

    Do you mean "Provide the textfields from another class into the GUI"?


    Honestly, I still cannot think a way of not using getters and setters. I am not against them and I...
  6. Replies
    2
    Views
    497

    Separate Event Handler Class

    Well, I kind of asked this question here (http://www.javaprogrammingforums.com/awt-java-swing/24952-event-handling-styles.html), but back then it was wise to use anonymous classes. And to be honest,...
  7. Replies
    8
    Views
    607

    Re: Sending and Receiving File

    It is working flawless and it is weird for me to say, but I kinda wanted this to fail. Because comparing the examples and my code, I feel like they are testing the connection for something, but I...
  8. Replies
    8
    Views
    607

    Re: Sending and Receiving File

    Thanks Norm! That will be my next objective. But, can you spot any potential problems with that? Because the others were so long and some of them were so complex, I thought I might be missing some...
  9. Replies
    8
    Views
    607

    Re: Sending and Receiving File

    Thanks for the tips :)
    My procedure for testing network stuff goes like this: localhost, then my network ip, then the other computer. Never tried but assuming the right ip and port are provided, a...
  10. Replies
    8
    Views
    607

    Re: Sending and Receiving File

    Possibly (About being poorly written). I realized that it does not save anything into the file. So I put a sysout in every line. It gets stuck here:

    bytesRead =...
  11. Replies
    8
    Views
    607

    Sending and Receiving File

    Hi,
    Recently I have been trying to send and receive stuff over network. I have two computers and I was practicing with them. Sending a simple text was easy, but file was not easy.
    I kept trying...
  12. Replies
    6
    Views
    488

    [SOLVED] Re: CardLayout does not show my content

    Damn...
    It is obvious now of course but... I thought the CardLayout is a little different than others and so I do not need this:

    rightPanel.add(panelOne);
    rightPanel.add(panelTwo);
    I...
  13. Replies
    6
    Views
    488

    [SOLVED] Re: CardLayout does not show my content

    Okay. This is my main class, only calls the GUI:

    public class SolveHere {

    public static void main(String[] args) {
    SolveSomehow m = new SolveSomehow();
    m.setVisible(true);

    }
    }
  14. Replies
    6
    Views
    488

    [SOLVED] Re: CardLayout does not show my content

    Norm, I hope this is enough for you to help me. The attached file includes my source file and a compiled app. The source and app only have the codes about the CardLayout.
  15. Replies
    6
    Views
    488

    [SOLVED] CardLayout does not show my content

    I have a JFrame, a JSplitPane as the container of the frame.
    On the left side of the splitpane, there are two radio buttons (more to come, but I am stuck).
    On the right side, there is a...
  16. Replies
    2
    Views
    375

    Re: Forum section to show the code?

    I was searching the net for this purpose and I noticed some people ask for money to look into the code.

    I realize that inspecting a code which is not yours is though. I am also sure it is tougher...
  17. Replies
    2
    Views
    375

    Forum section to show the code?

    Do we have a section to show our project codes for criticism?
    And would anyone be interested in looking into some nasty code?

    After struggling a long time with tutorials and trying to use ONLY...
  18. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    lol. Now you said it, I am not sure either :) I think I meant if this is one of the proper ways of implementing the multithreading concept.

    I see I used the same method as you did with your code...
  19. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    I meant the starting thread.
    Do the real world applications start the thread as I started? I mean like;

    private Thread t3 = new Thread(new Runnable(){
    @Override
    public void run() {...
  20. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    Like this? Look how I created t3 thread please.
    I had to make them static, because I run them in the main method which is static.


    public class ClassOne implements Runnable {
    static ClassOne...
  21. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    I asked the question wrong. So you gave me an answer which is obvious to me. Here is my problem:

    I have one run() method per one class. But I have three other methods in every class.
    I need this:...
  22. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    And that is where my real struggle starts. How do I make these two run from different threads?
  23. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    OK, here is my output (I put currentMillis thing to outside of the for loops).

    t1 will start. 1362667052439
    t1 started, t2 will. 1362667052439
    t2 started, someMethod someMethod will.
    And no...
  24. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    That was quick :)

    Yes, I am asking about these two. I actually don't have any problems with how and when run() methods are called.

    In my mind, when I try to implement multithreading, I think...
  25. Replies
    18
    Views
    1,126

    [SOLVED] Re: Threads - I need some explanations

    Yes, and I think I did it by Thread.sleep(500). But look at the output. "Class two angry method" did not run until the "Class One some method" stopped.
    So, how do I do that?
Results 1 to 25 of 95
Page 1 of 4 1 2 3 4