Search:

Type: Posts; User: DuncanS

Search: Search took 0.12 seconds.

  1. Replies
    8
    Views
    9

    Re: Get the mouse x , y?

    There was no way for me to know that within the confines of your post. I'll refer back to what GregBrannon posted initially:



    Provide some demonstrable code within your posts that indicates the...
  2. Replies
    13
    Views
    14

    Re: nary tree from string

    The out of memory error is caused because you never decrease p. Use --p instead of p - 1 here:
    Object get2 = a1.get(p-1);

    The ArrayOutOfBounds exception is because your break condition never...
  3. Replies
    8
    Views
    9

    Re: Get the mouse x , y?

    Note the very first line of my response - 'If you haven't already, ...'. I'm not going to dig through your entire project to debug your code for you. You gave a cursory explanation of your problem,...
  4. Re: Best way to solve this ConcurrentModificationException

    Maybe something like this?



    import java.util.ArrayList;
    import java.util.List;
    import java.util.ListIterator;

    public class SignalEmitter {
  5. Replies
    37
    Views
    38

    Re: Empty dialog

    Well I'm confused. I assume you mean to say that you haven't had a formal education in Java, but then I would argue that a formal education isn't necessary as long as you have the drive to learn the...
  6. Replies
    2
    Views
    3

    Re: multiple session browser

    The session shouldn't carry over to the new browser. How are you defining a session? How are the values being sent to the backend (ie. Spring, Struts)? Is there an auth procedure being used to...
  7. Replies
    37
    Views
    38

    Re: JCheckBox

    I feel as though this thread should be merged with your previous question.

    EDIT: You've posted 5 questions about this program in the past 24 hours... Do you do any of your own work?
  8. Replies
    37
    Views
    38

    Re: Empty dialog

    I don't really understand your point. Read the tutorials, and if there is a point at which functionality differs tangibly, find an OJDK reference for that specific functionality.

    Your code seems...
  9. Replies
    13
    Views
    14

    Re: nary tree from string

    It's your algorithm, so the burden is on you to make it right in the first place. If you want help with specific questions, this is the place, but from your initial question it seems as though you...
  10. Replies
    37
    Views
    38

    Re: Empty dialog

    You're in university. The web is an open book, full to the brim with information, so I suggest you start by actually trying to learn rather than passing the buck like this. There are myriad tutorials...
  11. Replies
    8
    Views
    9

    Re: Get the mouse x , y?

    If you haven't already, add a class that implements MouseListener and MouseMotionListener to your main frame - whichever you're using of the awt version of Applet/Frames or the Swing JApplet/JFrame -...
  12. Replies
    3
    Views
    4

    Re: Nagging Run Result on Console!

    Either set up run configurations for your programs, or right click the file in the Project Explorer view and select Run As > Java Application. You can also use the Run button drop-down menu to select...
  13. Poll: Re: I want to convert sloane1.com (php website) to Java Website

    PHP is just a preprocessor language. To "replace" an entire WordPress site with a Java stack would be very difficult, as you would have to build the site from the ground up. Your poll makes no sense...
  14. Thread: Java problem

    by DuncanS
    Replies
    7
    Views
    8

    Re: Java problem

    >= and <= are used when you need an inclusive set. if (num2>=5 && num2<=10) will return true for the set { 5, 6, 7, 8, 9, 10 }, whereas if (num2>5 && num2<10) will return true for the set { 6, 7, 8,...
  15. Replies
    4
    Views
    5

    Re: Alternating Numbers Of two sequences

    Use a ListIterator:



    public ArrayList<Integer> merge(Sequence other) {
    ListIterator<Integer> li = other.values.listIterator();

    for (Integer i : values) {
    if (li.hasNext()) {
    ...
  16. Thread: Java problem

    by DuncanS
    Replies
    7
    Views
    8

    Re: Java problem

    The issue is here:

    if (num2>15 && num3>15) {
    System.out.println ("Two larger");
    }

    With your inputs you're asking if (15>15 && 34>15), but 15 is not greater than 15, it is equal. If you need...
Results 1 to 16 of 16