• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

screen design for matching two columns using swing/Windowbuilder

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,  I am new to Java UI. I am trying to develop a screen where we can match two columns. 1st column can have sentences and 2nd can have some words from the sentences. My main aim is to highlight those cells in 2nd column  which are contained in 1st column when one clicks on the cell of 1st column.

Eg:

1st column                            2nd Column
I Love JAVARANCH                 JAVARANCH
I Love Programming               Love
I Like learning new stuff         Java
                                           stuff

[2nd column can have more entries than 1st column or vice versa]
On selecting "I Love JAVARANCH"  JAVARANCH and Love should get highlighted in 2nd column.

Which component should I use for achieving the same. List or Jtable or something else.

Also should I use Windowbuilder or JavaFX for desktop application
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

First off, there seems to be some confusion between JavaFX and Swing.  They are two different technologies, and although it is possible to combine them, I wouldn't recommend that.  Since you posted in the JavaFX forum, I'll stick with that.

I think using two StackPanes, one for the left and one for the right, would work well for the UI.  For the data, I'd use two ObservableLists, one for sentences and one for words.

Does that help you get started?
 
There's a way to do it better - find it. -Edison. A better tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic