Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
create 16 panels,each eith a colored border.
add 3x3 textfields to each panel.
add the panels to another panel in a 4x4 grid.
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!