• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Awt Dynamic Panel Design Issue � Help Needed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear folks,
I am asked to maintain some existing code and I am new to Awt.
This is the problem :
I need to create a dynamic Panel where I can drag and drop components from another panel. I need to create a form where the user chooses what components to have. The user can choose whether he/she needs a text box, a check box or a Label. The code already existing (which was written by someone else is) code provides the user with two panels. Left panel is like the drawing board. Right panel, the user has checkbox, Label etc. The user drags and drops each button according to his wish.
The first design problem I run with is this:
How do go about providing undo or delete an already dropped component?
I am sure I will have much more problems...but one by one.. :-)
Thanks a lot guys.
Tei.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WoW! You do have quite a chore ahead of you! I suggest you start looking into a Java based GUI builder application that has source code available and then tweek/tailor it down to fit your needs. There is an enormous amount of code required to do what you described in a professional manner. Just think of some of the things envolved; layout management, color management, perferrence management, Z-order and focus management, and, and, and etc.
Since it sounds like you are only at the Panel level, you'll need to go back to the JDK to check-out MouseListener and MouseMotionListener, Undo, and many, many,...others. Basically, code up some template "components" that get added to the target panel at the location of the mouse when the mouse button is released following a drag from the template's "tag" component that's the source of the drag operation.
Good Luck,
- Dan
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic