GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes how to get colored line to differentiate text field array in swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to get colored line to differentiate text field array in swing" Watch "how to get colored line to differentiate text field array in swing" New topic
Author

how to get colored line to differentiate text field array in swing

anoopkumar anoo
Greenhorn

Joined: Jul 29, 2012
Posts: 7
I have developed one frame on which I used GridBagLayout to arrange textfields of 12X12. i.e., total 144 textfields on frame. Now I want to differentiate these text fields with colored line after each 3 columns and three rows as shown in the following diagram. I shouldn't change the names of that text fields, because I interrelated those text fields using their names as jt[0][0], jt[0][1]......jt[6][2]........ and So on.I tried in many ways, but I couldn't find the solution. Please suggest. Below is the some part of my code. Thanks in advance.







Please consider the each number as one textfield in above diagram.


Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
create 16 panels,each eith a colored border.
add 3x3 textfields to each panel.
add the panels to another panel in a 4x4 grid.
 
GeeCON Prague 2014
 
subject: how to get colored line to differentiate text field array in swing