This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get colored line to differentiate text field array in swing