keiyia jackson

Ranch Hand
+ Follow
since Jul 16, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by keiyia jackson

try this. i used it for a project i was working on. call the method from your code.
public boolean isCellEditable(int row, int col)
{
return false;
}
21 years ago
can a menubar have a listener that would liseten for anything/item clicked. i need for a response to take affect if anyitem is clicked. i am trying to avoid setting a variable for each listener on the menubar for the menus.
thanks
21 years ago
i want that info placed in a buffer so it can be sent to c++ program and the string parsed using the jni. i am not concerned with the latter part. just want to know how to get the text into a buffer and back out to another text area.
thanks
21 years ago
i want that info placed in a buffer so it can be sent to c++ program and the string parsed using the jni. i am not concerned with the latter part. just want to know how to get the text into a buffer and back out to another text area.
thanks
21 years ago
Got it. I set the layout for the content pane to BoxLayout. Thanks
21 years ago
Um...any suggestions on how to do that. I always use frames.
21 years ago
Manfred,
Should I change it to a panel.
21 years ago
I have a JFrame with a menubar and submenus and a text field. I am trying to add three buttons to the empty part of the frame, below the textarea. i am alos using getContentPane().add(button1 (and 2 and 3)). Each button overlaps the other and you only see the last one in the code. any suggestions.
thanks
21 years ago
i have an applet that i am trying to run using appletviewer. i keep geeting a access denied exception no matter what i do. even if i grant allpermission in the java.policy. can some one PLEASE HELP!!!
is there a way to get the current column widths
22 years ago
It still doesn't put the info in the columns. It gets sufficient row space sjust want put the info in the table.
22 years ago
i have a gui that has a refresh menu item. it refreshes by resubmitting the query. my is problem is that once i refrsh, it changes the size of my columns to a chaaracter wide. any suggestions on how to keep my current column width even if the user resizes them.
22 years ago
try this (some part may be of no use):
[code]
private boolean ALLOW_COLUMN_SELECTION= false;
private boolean ALLOW_ROW_SELECTION= true;

table.setSelectionMode
(ListSelectionModel.SINGLE_SELECTION);
if (ALLOW_ROW_SELECTION)
{
ListSelectionModel row =table.getSelectionModel();
row.addListSelectionListener(new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
//Ignore extra messages.
if (e.getValueIsAdjusting())
return;
lsm =(ListSelectionModel)e.getSource();
if (lsm.isSelectionEmpty())
{
output.setText("No rows are selected.");
output.setText("\n");
}
else
{
selectedRow = lsm.getMinSelectionIndex();
if (resultObjects!=null)
{

try
{
if (selectedRow<resultObjects.length)>
output.setText(SNReflection.print(resultObjects[selectedRow], false));
System.out.println("Row " + selectedRow
+ " is now selected.");
}
catch (Exception exc)
{
exc.printStackTrace();
System.out.print(exc);
output.setText("Unable to display object.");
}
}
else
output.setText("No data found");
}
}
});
}
else
{
table.setRowSelectionAllowed(false);
}
if (ALLOW_COLUMN_SELECTION)
{ // false by default
if (ALLOW_ROW_SELECTION)
{
//We allow both row and column selection, which
//implies that we *really* want to allow individual
//cell selection.
table.setCellSelectionEnabled(true);
}
table.setColumnSelectionAllowed(true);
ListSelectionModel colSM =
table.getColumnModel().getSelectionModel();
colSM.addListSelectionListener(new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
//Ignore extra messages.
if (e.getValueIsAdjusting())
return;
lsm = (ListSelectionModel)e.getSource();
if (lsm.isSelectionEmpty())
{
output.setText("No columns are selected.");
//output.append(SNReflection.print("No columns are selected."));

output.setText("\n");
}
else
{
int selectedCol = lsm.getMinSelectionIndex();
//output.setText("Column " + selectedCol +
//" is now selected.");
System.out.println("Column " + selectedCol +
" is now selected.");
output.setText("\n");
}
}
});
}
[code]
use what you need omit the rest
22 years ago
I am using an this model and am trying to update my table after a submitted query. Everything works except for the table doesn't update. Any suggestions.
22 years ago