CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Londbrok

Page 1 of 18 1 2 3 4

Search: Search took 0.17 seconds.

  1. Thread: Threads

    by Londbrok
    Replies
    3
    Views
    949

    Re: Threads

    It is good to exercise caution with threads. Have as few as you can, and as many as you must. There is no automatic benefits of having multiple threads as such. When used with reason threads can...
  2. Replies
    3
    Views
    11,058

    Re: jComboBox in specific JTable cell

    How do you specify which values belong to which row? Who is in charge of those, the table model?

    You can write an extension of DefaultCellEditor. When getTableCellEditorComponent(...) is called,...
  3. Replies
    2
    Views
    848

    Re: a boolean divisible

    Use modulo % as in: num1%num2==0
  4. Replies
    4
    Views
    3,840

    Re: Stupid beginner Mistake, Can you help?

    Check up on how to call methods, you are using assing operation as if directly setting variable values.

    SomeClass someInstance=new SomeClass(some pararms, or none);...
  5. Replies
    4
    Views
    3,255

    Re: Help fix this code

    yeah sure does , how blind of me.
  6. Replies
    3
    Views
    1,082

    Re: java.lang.NullPointerException :P

    Why do you use findInLine method? Why not just check the input?

    Why do you expect that System.in would contain a "."? You do not place it there and should the user somehow know place it, he would...
  7. Replies
    4
    Views
    3,255

    Re: Help fix this code

    Do you actually ever add something to the priority queue? You create it with size and a comprator, but theres no trace of actual values being added.
  8. Replies
    2
    Views
    1,205

    Re: Doubts regarding bar charts and pie charts

    Do you have the images in your disposal. If not, what chart library do you use?
  9. Replies
    4
    Views
    1,072

    Re: Not getting any result..

    Dont know what you mean by that? Show the changes you made, please use [Code] tags
  10. Replies
    4
    Views
    1,072

    Re: Not getting any result..

    Check your methods for adding / decreasing speed.

    For the first thing, myint+1 does not add anything to your myint variable. Use myint+=1 (same as myint = myint+1). Also, you allow inifinite...
  11. Replies
    1
    Views
    745

    Re: Need help with buttons...

    Laying out the components in a container is strictly married to the LayoutManager that is used. Frames contentpanes use BorderLayout by default, anything added to BorderLayout by calling single param...
  12. Replies
    2
    Views
    1,908

    Re: Java ResultSet and column database problem

    In my humble opinion, you get a clean result storing the long value for the time. You can store this as a Unix time, (Seconds from epoch -> Java time / 1000), milliseconds, or even nanoseconds,...
  13. Replies
    1
    Views
    3,111

    Re: Help with .csv file to ArrayList

    You have a CSV file, you comment specifically that the entries are separated by a comma... and still you tokenize it with a tabulator? Is this as intended?

    Have you looked at Scanner? While your...
  14. Replies
    10
    Views
    4,927

    Re: Java Board Grid + Moving objects

    Yes you can always query the focus owner from FocusManager, there is a static getter. Note that for this work, your components need to have a KeyListener of some sorts assigned to them.

    So you...
  15. Re: Creation of GUI from contents of xml file

    If you think of a tree as such, it is very XML like. There are plenty of examples on how to use direct XML document for building tree components in Java. You can take a look at those, or implement...
  16. Replies
    6
    Views
    1,538

    Re: Java Collections

    Given answers still apply.

    Take a look at Collection contains method. How does it determine the return value? As Keang already pointed out, having an efficient equals is the crucial part. On top...
  17. Replies
    6
    Views
    1,538

    Re: Java Collections

    Fix it so that it will? Are you serious?

    Given the problems that you noted and the implementation you provided... I dont see where you have issues. You have provided a Person class, but nothing...
  18. Thread: Reading data.

    by Londbrok
    Replies
    2
    Views
    999

    Re: Reading data.

    A number of APIs. For a simple text file, Scanner is a convinient and easy to use approach. You can create a Scanner for the file, iterate it line by line in a while loop. If your file format is more...
  19. Replies
    5
    Views
    8,690

    Re: PhoneBook entries with ArrayList problem

    You have a list of PhoneBook objects, to which you attach two Strings. Add proper elements to your list and you will get forward. Creating a single instance of PhoneBook does absolutely nothing in...
  20. Re: Creating and implementing class for creating a calendar object

    I dont know if this is a school exercise. If it is, you need to follow the requirements (whatever they are) specifically. Any case, I would give you these pointers:

    What you seem to be doing,...
  21. Thread: help!

    by Londbrok
    Replies
    2
    Views
    3,969

    Re: help!

    1. Use code tags, preserves readable formatting of the code.
    2. Post relevant information. - Stack trace (if any), code samples that shed actual light on your issue.
    3. Please mark to which line of...
  22. Replies
    7
    Views
    1,417

    Re: JComboBox with deletable entries

    Well, there is an option to add a PopUpMenuListener to the combobox, events of that are likely to have the popup panel as a source.... no, just checked it, source is the combobox. Theoretically you...
  23. Replies
    7
    Views
    1,417

    Re: JComboBox with deletable entries

    Without having to sink into the underlying depths of how rendered components are assembled, you might consider this....

    You can have mouse listener in the comboboxes popup panel, which will tell...
  24. Replies
    6
    Views
    2,945

    Re: java program using array's help

    You code is not that complete, heres some general tips:

    Ask both numbers from the user before doing any testing. Then iterate the array looking for the first number, if it is found, the number...
  25. Replies
    2
    Views
    5,205

    Re: Simultaneous JEditorPane/JtextField editing

    You could consider a diff -like approach. The server would contain the model, being the text under editing. Handling it must be synchronized, clients send a changeEvent (such as simply: line number,...
Results 1 to 25 of 444
Page 1 of 18 1 2 3 4





Click Here to Expand Forum to Full Width

Featured