Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 8 of 8 FirstFirst ... 678
Results 176 to 192 of 192

Thread: drag and drop word to match image

  1. #176
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    Quote Originally Posted by Norm View Post
    The DropTargetTextArea constructor takes a String but there wasn't a String provided.
    Add a String as an arg in the new statement.

    okay..

    so from the method i need to take out this code below and put in the constructor?
    Last edited by stresstedout; March 4th, 2014 at 01:44 AM.

  2. #177
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    Yes. The String to accept is passed in the constructor, not hard coded in the method.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #178
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    Quote Originally Posted by Norm View Post
    Yes. The String to accept is passed in the constructor, not hard coded in the method.
    i have done that but it still comes up with the error

    run:
    Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - constructor DropTargetTextArea in class javaapplication24.DragAndDropExample.DropTargetTex tArea cannot be applied to given types;
    required: java.lang.String
    found: no arguments
    reason: actual and formal argument lists differ in length
    at javaapplication24.DragAndDropExample.main(DragAndD ropExample.java:66)
    Java Result: 1
    Last edited by stresstedout; March 4th, 2014 at 01:44 AM.

  4. #179
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    Is that the same error as in post#172
    What did you do to fix that error? If you don't fix the errors they don't go away and you are wasting time trying to continue if you don't fix the errors.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #180
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    i am trying to fix it i did say its still the problem

    here i have added
    Last edited by stresstedout; March 4th, 2014 at 01:44 AM.

  6. #181
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    Did you fix the error shown in posts#172 and 178?

    Those two Strings: string1 and string2 are supposed to be deleted, not moved around.
    If you don't understand my answer, don't ignore it, ask a question.

  7. #182
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    i thought u said i needed to them to the constructor

  8. #183
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    When did I say that?
    If you don't understand my answer, don't ignore it, ask a question.

  9. #184
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    post #176 and #177

  10. #185
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    I said: The String to accept is passed in the constructor
    There is nothing there about moving TWO Strings.
    If you don't understand my answer, don't ignore it, ask a question.

  11. #186
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    Quote Originally Posted by Norm View Post
    I said: The String to accept is passed in the constructor
    There is nothing there about moving TWO Strings.
    i said okay..

    so from the method i need to take out this code below and put in the constructor?


    you said

    yes. The String to accept is passed in the constructor

    --- Update ---

    anyways so i need to do Add a String as an arg in the new statement..
    does this go in the public static void main(String[] args) {
    ????

  12. #187
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    This is getting to be a big waste of time. I'm getting tired of repeating myself. If you'll look back through the posts on this thread, this topic has been covered several times.
    If you don't understand my answer, don't ignore it, ask a question.

  13. #188
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    sorry dont get angry please

  14. #189
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    i need to do Add a String as an arg in the new statement..
    does this go in the public static void main(String[] args) {
    That statement shows how little you know about coding java.

    There is no way you can hope to finish this project with your current java knowledge. I'm not sure that you are currently capable of learning to code a java program.
    It could be that your English isn't good enough. Certainly your knowledge of java programming terms needs work.
    If you don't understand my answer, don't ignore it, ask a question.

  15. #190
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    i know i need to add string as an argument in the constructor.

    when i said does this go in public static void main(string args.

    what i meant was do i need to add anything in there.. i didnt read what i wrote. anyways cheers for knocking any confidence i did have

  16. #191
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: drag and drop word to match image

    If you'd work on smaller projects like what I suggested in post#161 maybe then ....
    If you don't understand my answer, don't ignore it, ask a question.

  17. #192
    Member
    Join Date
    Jan 2014
    Posts
    209
    My Mood
    Depressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: drag and drop word to match image

    so that is incorrect... i have realized now. i have amendend the code.
    Last edited by stresstedout; March 4th, 2014 at 01:45 AM.

Page 8 of 8 FirstFirst ... 678

Similar Threads

  1. Drag and Drop in JTrees
    By helloworld922 in forum Java Swing Tutorials
    Replies: 4
    Last Post: March 21st, 2014, 11:16 AM
  2. [SOLVED] Drag and drop in MVC
    By Alice in forum Object Oriented Programming
    Replies: 9
    Last Post: December 9th, 2010, 10:16 PM
  3. Drag and Drop in JTrees
    By helloworld922 in forum Java Code Snippets and Tutorials
    Replies: 2
    Last Post: February 20th, 2010, 03:52 PM
  4. Drag and Drop in JTrees
    By helloworld922 in forum AWT / Java Swing
    Replies: 2
    Last Post: January 19th, 2010, 11:51 PM
  5. 'MouseUp' Drag and Drop Events
    By copeg in forum AWT / Java Swing
    Replies: 0
    Last Post: November 10th, 2009, 07:21 PM