[F8/AS2] ScrollPane scrollbars not showing in IE. WHYYYYY!!
Argh! ScrollPane is a Pain! Been working on this for 2 weeks!
HELP!!
In a container movie, I have loaded an swf that contains a
scrollPane which in turn loads an external swf.
In Firefox, it works like a charm. In IE, the scroll bars do
not appear!
Here is the code I am using in the swf that contains the
scrollPane:
var scrollContent:mx.containers.ScrollPane;
scrollContent.contentPath ="ABSOLUTE_LINK_TO_MY.SWF";
scrollContent.setStyle("themeColor","haloBlue");
scrollContent.setSize(248,375);
scrollContent.border_mc._height = 0;
scrollContent.border_mc._width = 0;
scrollContent.hScrollPolicy="auto";
scrollContent.vScrollPolicy="auto";
scrollContent.refreshPane();
The live example is here. Click on Programs then Purple Scarf
Project:
http://www.becausecuidamos.com/newsite/index.htm
On the Internet, I've seen tons of posts about this problem.
But no matter where I look, no one posts a solution. Can anyone
here help? PLEASE!!!!
Thank you
Argh! ScrollPane is a Pain! Been working on this for 2 weeks!
HELP!!
In a container movie, I have loaded an swf that contains a
scrollPane which in turn loads an external swf.
In Firefox, it works like a charm. In IE, the scroll bars do
not appear!
Here is the code I am using in the swf that contains the
scrollPane:
var scrollContent:mx.containers.ScrollPane;
scrollContent.contentPath ="ABSOLUTE_LINK_TO_MY.SWF";
scrollContent.setStyle("themeColor","haloBlue");
scrollContent.setSize(248,375);
scrollContent.border_mc._height = 0;
scrollContent.border_mc._width = 0;
scrollContent.hScrollPolicy="auto";
scrollContent.vScrollPolicy="auto";
scrollContent.refreshPane();
The live example is here. Click on Programs then Purple Scarf
Project:
http://www.becausecuidamos.com/newsite/index.htm
On the Internet, I've seen tons of posts about this problem.
But no matter where I look, no one posts a solution. Can anyone
here help? PLEASE!!!!
Thank you
Similar Messages
-
Vertical scrollbar not showing all the records when I scroll down.
Vertical scrollbar not showing all the records when I scroll down.
Using Oracle forms 10g , operating system windows
I have two fields with number of items dispayed = 15.
I have a vertical scroll bar with them. There are 34 records in the table but the scrollbar only shows 15 records.
Here are the properties for block / scrollbar.
WORK_CATEGORY
- Subclass Information
- Comments
* Navigation Style Same Record
- Previous Navigation Data Block
- Next Navigation Data Block
- Current Record Visual Attribute Group
- Query Array Size 0
- Number of Records Buffered 0
* Number of Records Displayed 60
* Query All Records No
- Record Orientation Vertical
* Single Record No
- Database Data Block Yes
- Enforce Primary Key No
- Query Allowed Yes
- Query Data Source Type Table
* Query Data Source Name WORK_CATEGORY
* Query Data Source Columns
* Column Name JOB_TYPE
* Column Type VARCHAR2
- Column Type Name
- Parent Column
* Length 30
* Precision 0
* Scale 0
* Mandatory Yes
* Column Name WORK_CATEGORY
* Column Type VARCHAR2
- Column Type Name
- Parent Column
* Length 30
* Precision 0
* Scale 0
* Mandatory Yes
- Query Data Source Arguments
- Alias
- Include REF Item No
* WHERE Clause
* ORDER BY Clause job_type
- Optimizer Hint
- Insert Allowed Yes
- Update Allowed Yes
- Locking Mode Automatic
- Delete Allowed Yes
- Key Mode Automatic
- Update Changed Columns Only No
- Enforce Column Security No
- Maximum Query Time 0
* Maximum Records Fetched 0
- DML Data Target Type Table
- DML Data Target Name
- Insert Procedure Name
- Insert Procedure Result Set Columns
- Insert Procedure Arguments
- Update Procedure Name
- Update Procedure Result Set Columns
- Update Procedure Arguments
Don't know where am I going wrong. I'll really appreciate if you can help me in this.
Thanks.
Edited by: 831050 on Sep 14, 2011 8:05 AMOne of the items is a list item.. here are it's properties:
* Name JOB_TYPE
* Item Type List Item
- Subclass Information
- Comments
- Help Book Topic
- Enabled Yes
* Elements in List
* Label
* List Item Value LIST20
* List Style Combo Box
- Mapping of Other Values
- Implementation Class
- Case Restriction Mixed
- Popup Menu
- Keyboard Navigable Yes
- Mouse Navigate Yes
- Previous Navigation Item
- Next Navigation Item
- Data Type Char
- Data Length Semantics Null
- Maximum Length 30
- Initial Value
* Required Yes
* Copy Value from Item
- Synchronize with Item
- Calculation Mode None
- Formula
- Summary Function None
- Summarized Block
- Summarized Item
- Current Record Visual Attribute Group
- Distance Between Records 0
* Number of Items Displayed 15
- Database Item Yes
* Column Name JOB_TYPE
- Primary Key No
- Query Only No
- Query Allowed Yes
- Insert Allowed Yes
- Update Allowed Yes
- Update Only if NULL No
- Visible Yes
* Canvas CANVAS2
- Tab Page
* X Position 47
* Y Position 137
* Width 187
* Height 18
- Visual Attribute Group DEFAULT
- Prompt Visual Attribute Group DEFAULT
- Foreground Color
* Background Color white
- Fill Pattern
- Font
* Font Name Tahoma
* Font Size 10
* Font Weight Demilight
* Font Style Plain
* Font Spacing Normal
* Prompt Job Type
- Prompt Display Style First Record
* Prompt Justification Start
* Prompt Attachment Edge Top
- Prompt Alignment Start
* Prompt Attachment Offset 10
* Prompt Alignment Offset 0
- Prompt Reading Order Default
- Prompt Foreground Color
- Prompt Font
* Prompt Font Name Tahoma
* Prompt Font Size 10
* Prompt Font Weight Bold
* Prompt Font Style Plain
* Prompt Font Spacing Normal
- Hint
- Display Hint Automatically No
- Tooltip
- Tooltip Visual Attribute Group
- Direction Default
- Initial Keyboard State Default
- Keyboard State Any
-
ScrollBars not showing up properly
I am displaying a JTree in a JScrollPane with default settings ie. both horizontal and vertical scroll bars will show up when the contents can not fit in to the scroll pane.In this case when i expand the tree nodes the scroll bars are not showing up properly.It looks like the foreground is not painted properly.The background color is white here.We are using custom look and feel, not the standard one. Any idea why it is so?
Thanx in advance
AshokThis is the MetalTheme i am using.
public class SSBCMetalTheme extends javax.swing.plaf.metal.MetalTheme
// private final ColorUIResource primary1 = new ColorUIResource(102,102,153);
private final ColorUIResource primary1 = new ColorUIResource(0,0,0);
// private final ColorUIResource primary2 = new ColorUIResource(153,153,204);
private final ColorUIResource primary2 = new ColorUIResource(153,153,153);
// private final ColorUIResource primary3 = new ColorUIResource(204,204,255);
private final ColorUIResource primary3 = new ColorUIResource(204,204,204);
private final ColorUIResource windowBackground = new ColorUIResource(Color.white);
private final ColorUIResource textHighlight = new ColorUIResource(Color.blue);
private final ColorUIResource secondary1 = new ColorUIResource(102,102,102);
private final ColorUIResource secondary2 = new ColorUIResource(153,153,153);
private final ColorUIResource secondary3 = new ColorUIResource(204,204,204);
// private FontUIResource controlFont = new FontUIResource("Dialog",Font.BOLD,12);
private FontUIResource controlFont = new FontUIResource("Dialog",Font.BOLD,11);
// private FontUIResource systemFont = new FontUIResource("Dialog",Font.PLAIN,12);
private FontUIResource systemFont = new FontUIResource("Dialog",Font.PLAIN,11);
// private FontUIResource userFont = new FontUIResource("Dialog",Font.PLAIN,12);
private FontUIResource userFont = new FontUIResource("Dialog",Font.PLAIN,11);
private FontUIResource smallFont = new FontUIResource("Dialog",Font.PLAIN,10);
public String getName() { return "SSBC"; }
protected ColorUIResource getPrimary1() { return primary1; }
protected ColorUIResource getPrimary2() { return primary2; }
protected ColorUIResource getPrimary3() { return primary3; }
protected ColorUIResource getSecondary1() { return secondary1; }
protected ColorUIResource getSecondary2() { return secondary2; }
protected ColorUIResource getSecondary3() { return secondary3; }
//public ColorUIResource getWindowBackground() { return (primary3); };
public ColorUIResource getWindowBackground() { return windowBackground; };
public ColorUIResource getDesktopColor() { return (primary3); };
public ColorUIResource getTextHighlightColor(){ return primary3;}
//public ColorUIResource getControlDisabled(){ return primary3;}
//public ColorUIResource getControlHighlight(){ return windowBackground;}
public FontUIResource getControlTextFont() { return controlFont;}
public FontUIResource getSystemTextFont() { return systemFont;}
public FontUIResource getUserTextFont() { return userFont;}
public FontUIResource getMenuTextFont() { return controlFont;}
public FontUIResource getWindowTitleFont() { return controlFont;}
public FontUIResource getSubTextFont() { return smallFont;}
I can't use windows look and feel as i am using the above look and feel.Any idea what is the problem?
Thanx
Ashok -
Scrollpane scrollbar not reponding to clicks
Hi all,
I'm using the scrollpanesample from the UIControlSamples, however when I click on the scrollbar arrows or between an arrow and the knob, nothing happens. Is there a setting or event I need to define for the scrollpane scrollbar to function as expected?
Thanks in advance
*^* <--- arrow, click here and nothing happens
| | <--- click here and nothing happens
| |
[0] <--- knob, you can click, hold and move using the knobThat is normal.
Press hard the trackpad to register the click.
System Preferences > Trackpad > Point & Click
Enable "Tap to click".
Best. -
ScrollBars not showing up for the JPanel [urgent]
Hi,
I have a frame in which i have two nested split panes i.e one horizontal splitpane and in that i am having one more split pane on the right side and a JTree on the left side.In the second split pane (which is a vertical split) ,as a top component , i am setting a JScrollPane in which i am trying to display a JPanel which is having a lot of swing components in it.I want to see the scroll bars for this panel so that i can see all the components.Do i have to implement Scrollable interface for this panel to scroll in the ScrollPane.I don't know how to implement Scrollable interface.Can some body help me in resolving this?This is some what urgent.Any help will be highly appreciated.
Thanks in advance.
AshokThank you all for your replies.I added the scroll bar policy.The scroll bars are showing up but the components inside the Panel are not moving.I want the components to move when i am scrolling.Here is my code.In the code SeriesDescPanel, SeriesDescMapPanel are sub classes of JPanel.I am using null layout to add the components to these panels.
public class MainWindow extends JFrame implements TreeExpansionListener
public MainWindow()
throws RemoteException
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS
setJMenuBar(menuBar);
setTitle("Series Maintenance");
getContentPane().setLayout(new BorderLayout(0,0));
setSize(667,478);
setVisible(false);
JSplitPane1.setDividerSize(1);
JSplitPane1.setOneTouchExpandable(true);
getContentPane().add(BorderLayout.CENTER, JSplitPane1);
seriesMenu.setText("Series");
seriesMenu.setActionCommand("Series");
menuBar.add(seriesMenu);
newSeriesGroupMenuItem.setText("New Series Group");
newSeriesGroupMenuItem.setActionCommand("New Series Group");
seriesMenu.add(newSeriesGroupMenuItem);
newSeriesMenuItem.setText("New Series");
newSeriesMenuItem.setActionCommand("New Series");
seriesMenu.add(newSeriesMenuItem);
seriesMenu.add(JSeparator1);
serachMenuItem.setText("Search");
serachMenuItem.setActionCommand("Search");
seriesMenu.add(serachMenuItem);
seriesMenu.add(JSeparator2);
saveMenuItem.setText("Save");
saveMenuItem.setActionCommand("Save");
seriesMenu.add(saveMenuItem);
seriesMenu.add(JSeparator3);
exitMenuItem.setText("Exit");
exitMenuItem.setActionCommand("Exit");
seriesMenu.add(exitMenuItem);
adminMenu.setText("Administration");
adminMenu.setActionCommand("Administration");
menuBar.add(adminMenu);
bulkLoadMenuItem.setText("Bulk Load");
bulkLoadMenuItem.setActionCommand("Bulk Load");
adminMenu.add(bulkLoadMenuItem);
drsMenuItem.setText("DRS override");
drsMenuItem.setActionCommand("DRS override");
adminMenu.add(drsMenuItem);
helpMenu.setText("Help");
helpMenu.setActionCommand("Help");
menuBar.add(helpMenu);
tutorialMenuItem.setText("Tutorial");
tutorialMenuItem.setActionCommand("Tutorial");
helpMenu.add(tutorialMenuItem);
bulkLoadFormatMenuItem.setText("Bulk Load Format");
bulkLoadFormatMenuItem.setActionCommand("Bulk Load Format");
helpMenu.add(bulkLoadFormatMenuItem);
aboutMenuItem.setText("About");
aboutMenuItem.setActionCommand("About");
helpMenu.add(aboutMenuItem);
JSplitPane2 = new javax.swing.JSplitPane();
upperPanel = new SeriesDescPanel();
JScrollPane2 = new javax.swing.JScrollPane(upperPanel,
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JScrollPane3 = new javax.swing.JScrollPane();
JSplitPane2.setOrientation(0);
JSplitPane2.setDividerSize(1);
JSplitPane2.setOneTouchExpandable(true);
JSplitPane1.setRightComponent(JSplitPane2);
JSplitPane1.setLeftComponent(viewPane);
viewPane.add(alphabeticPane);
viewPane.add(searchDataPane);
viewPane.setTitleAt(0,"All");
viewPane.setTitleAt(1,"search");
//JScrollPane1.setMinimumSize(new Dimension(126, 478));
JSplitPane2.setTopComponent(JScrollPane2);
//JScrollPane2.setMinimumSize(new Dimension(426, 409));
JSplitPane2.setBottomComponent(JScrollPane3);
lowerPanel = new SeriesDescMapPanel();
seriesTreeModel = new SeriesTreeModel(SeriesMaintenanceUI.getSeriesGroupInfo());
tickersTree.setModel(seriesTreeModel);
alphabeticPane.getViewport().setView(tickersTree);
//JScrollPane2.getViewport().setView(upperPanel);
//JScrollPane2.setViewportView(upperPanel);
//upperPanel.scrollRectToVisible(new Rectangle(upperPanel.getWidth(),
//upperPanel.getHeight(),1,1));
JScrollPane3.getViewport().setView(lowerPanel);
//JSplitPane2.setPreferredSize(new Dimension(426,200));
SeriesDescPanel upperPanel;
SeriesDescMapPanel lowerPanel;
SeriesTreeModel seriesTreeModel;
SeriesTreeModel searchTreeModel;
javax.swing.JSplitPane JSplitPane2;
javax.swing.JScrollPane JScrollPane2;
javax.swing.JScrollPane JScrollPane3;
javax.swing.JTree tickersTree = new javax.swing.JTree();
javax.swing.JTree searchTree = new javax.swing.JTree();
javax.swing.JScrollPane alphabeticPane = new javax.swing.JScrollPane();
javax.swing.JTabbedPane viewPane = new JTabbedPane(SwingConstants.BOTTOM);
javax.swing.JScrollPane searchDataPane = new javax.swing.JScrollPane();
//{{DECLARE_CONTROLS
javax.swing.JSplitPane JSplitPane1 = new javax.swing.JSplitPane();
javax.swing.JMenuBar menuBar = new javax.swing.JMenuBar();
javax.swing.JMenu seriesMenu = new javax.swing.JMenu();
javax.swing.JMenuItem newSeriesGroupMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenuItem newSeriesMenuItem = new javax.swing.JMenuItem();
javax.swing.JSeparator JSeparator1 = new javax.swing.JSeparator();
javax.swing.JMenuItem serachMenuItem = new javax.swing.JMenuItem();
javax.swing.JSeparator JSeparator2 = new javax.swing.JSeparator();
javax.swing.JMenuItem saveMenuItem = new javax.swing.JMenuItem();
javax.swing.JSeparator JSeparator3 = new javax.swing.JSeparator();
javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenu adminMenu = new javax.swing.JMenu();
javax.swing.JMenuItem bulkLoadMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenuItem drsMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenu helpMenu = new javax.swing.JMenu();
javax.swing.JMenuItem tutorialMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenuItem bulkLoadFormatMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
Pl. help me in resolving this.
Ashok -
DataGridView : ScrollBars not showing
Hi all.
I have a WinForms application. It is c#, .NET 2.0. On a form, I have 3 DataGridView controls. They all have their ScrollBars property set to Both. The scroll bars for the first two grids work ok, the third grid never shows them. There is absolutely no difference in the definition of the grids. The only difference is that the 3rd gird is wider. So far, I've tried to:
- set the AutoSizeMode property of the columns to different values, did not work.
- set the AutoSizeColumnsMode of the grid, it did not work.
- changed the size of the grid, it did not work(originally it was wider than the form. Making it smaller did not work).
Does anybody know what I can do to get the 3rd grid to show the scrollbars ?
Thanks in advance for your help,
EMI came across this post while trying to solve the same problem. I had a datagridview with databinding and when it was filled, it resized right off the form, with no scroll bars. I realized I'd set the grid itself to autoresize. As soon as I set
autoresize (of the grid, not the col or row) back to false, scrollbars appear again.
Seems kind of obvious now... if the grid resizes to fit the data, there is no need for scrollbars :)
dataGridView1.AutoSize = false; // or set in control properties -
This does not happen in IE, only FireFox. When Yahoo Mail loads it does not "Load" completely. Icons, Flags, Scrollbars, direction arrows, etc. do NOT load. The functions still exist and work, but if I didn't already know where some of them are located it would be impossible to use them because the "visual icons" do not show up.
See:
*[[Images or animations do not show]]
*http://kb.mozillazine.org/Images_or_animations_do_not_load
See also http://kb.mozillazine.org/Websites_look_wrong -
I am using a multiline textbox and the problem is its not showing vertical scrollbar in safari browser.
If you are having problems scrolling within a frame then you should be able to use two fingers within the frame to scroll
-
JTable Problem (table does not show rows and columns)
Hi All,
What the table is suppose to do.
- Load information from a database
- put all the values in the first column
- in the second column put combobox (cell editor with numbers 1-12)
- the 3rd column put another combobox for something else
- the 4th column uses checkbox as an edit
The number of rows of the table should be equal to the number of
record from
the database. If not given it default to 20 (poor but ok for this)
The number of columns is 4.
But the table does not show any rows or
column when I put it inside a
JScrollPane (Otherwise it works).
Please help,
thanks in advance.
public class SubjectTable extends JTable {
* Comment for <code>serialVersionUID</code>
private static final long serialVersionUID = 1L;
/** combo for the list of classes */
protected JComboBox classCombo;
/** combo for the list of subjects */
protected JComboBox subjectsCombo;
/** combo for the list of grade */
protected JComboBox gradeCombo;
boolean canResize = false;
boolean canReorder = false;
boolean canSelectRow = false;
boolean canSelectCell = true;
boolean canSelectColumn = true;
// the row height of the table
int rowHeight = 22;
// the height of the table
int height = 200;
// the width of the table
int width = 300;
// the size of the table
Dimension size;
* Parameterless constructor. Class the one of the other constructors
to
* create a table with the a new <code>SubjectTableModel</code>.
public SubjectTable() {
this(new SubjectTableModel());
* Copy constructor to create the table with the given
* <code>SubjectTableModel</code>
* @param tableModel -
* the <code>SubjectTableModel</code> with which to
initialise
* the table.
SubjectTable(SubjectTableModel tableModel) {
setModel(tableModel);
setupTable();
* Function to setup the table's functionality
private void setupTable() {
clear();
// set the row hieght
this.setRowHeight(this.rowHeight);
// set the font size to 12
//TODO this.setFont(Settings.getDefaultFont());
// disble reordering of columns
this.getTableHeader().setReorderingAllowed(this.canReorder);
// disble resing of columns
this.getTableHeader().setResizingAllowed(this.canResize);
// enable the horizontal scrollbar
this.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// disable row selection
setRowSelectionAllowed(this.canSelectRow);
// disable column selection
setColumnSelectionAllowed(this.canSelectColumn);
// enable cell selection
setCellSelectionEnabled(this.canSelectCell);
setPreferredScrollableViewportSize(getSize());
TableColumn columns = null;
int cols = getColumnCount();
for (int col = 0; col < cols; col++) {
columns = getColumnModel().getColumn(col);
switch (col) {
case 0:// subject name column
columns.setPreferredWidth(130);
break;
case 1:// grade column
columns.setPreferredWidth(60);
break;
case 2:// class room column
columns.setPreferredWidth(120);
break;
case 3:// select column
columns.setPreferredWidth(65);
break;
} // end switch
}// end for
// set up the cell editors
doGradeColumn();
doClassColumn();
//doSubjectColumn();
* Function to clear the table selection. This selection is different
to
* <code>javax.swing.JTable#clearSelection()</code>. It clears the
user
* input
public void clear() {
for (int row = 0; row < getRowCount(); row++) {
for (int col = 0; col < getColumnCount(); col++) {
if (getColumnName(getColumnCount() - 1).equals("Select")) {
setValueAt(new Boolean(false), row, getColumnCount() - 1);
}// if
}// for col
}// for row
* Function to set the cell renderer for the subjects column. It uses
a
* combobox as a cell editor in the teacher's subjects table.
public void doSubjectColumn() {
TableColumn nameColumn = getColumnModel().getColumn(0);
nameColumn.setCellEditor(new DefaultCellEditor(getSubjectsCombo()));
// set up the celll renderer
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setToolTipText("Click for drop down list");
nameColumn.setCellRenderer(renderer);
// Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = nameColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer) headerRenderer)
.setToolTipText("Click the Name to see a list of choices");
}// end doSubjectsColumn----------------------------------------------
/** Function to set up the grade combo box. */
public void doGradeColumn() {
TableColumn gradeColumn = getColumnModel().getColumn(1);
gradeColumn.setCellEditor(new DefaultCellEditor(getGradeCombo()));
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setToolTipText("Click for drop down list");
gradeColumn.setCellRenderer(renderer);
// Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = gradeColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer) headerRenderer)
.setToolTipText("Click the Grade to see a list of choices");
}// end doGradeColumn-------------------------------------------------
* Function to setup the Class room Column of the subjects
public void doClassColumn() {
// set the column for the classroom
TableColumn classColumn = getColumnModel().getColumn(2);
classColumn.setCellEditor(new DefaultCellEditor(getClassCombo()));
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setToolTipText("Click for drop down list");
classColumn.setCellRenderer(renderer);
// Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = classColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer) headerRenderer)
.setToolTipText("Click the Class to see a list of choices");
}// end doClassColumn--------------------------------------------------
* Function to get the size of the table
* @return Returns the size.
public Dimension getSize() {
if (this.size == null) {
this.size = new Dimension(this.height, this.width);
return this.size;
* Function to set the size of the table
* @param dim
* The size to set.
public void setSize(Dimension dim) {
if (dim != null) {
this.size = dim;
return;
* Function to create/setup the class room comboBox. If the comboBox
is
* <code>null</code> a nwew one is created else the functon returns
the
* function that was returned initially.
* @return Returns the classCombo.
private JComboBox getClassCombo() {
if (this.classCombo == null) {
this.classCombo = new JComboBox();
// fill up the class name combo
ArrayList classRooms = new ArrayList();
try {
//TODO classRooms = Settings.getDatabase().getClassRooms();
for (int i = 0; i < 10; i++) {
String string = new String("Class");
string += i;
if (!classRooms.isEmpty()) {
classRooms.trimToSize();
for (int i = 0; i < classRooms.size(); i++) {
this.classCombo.addItem(classRooms.get(i));
} catch (Exception e) {
e.printStackTrace();
return this.classCombo;
* Function to create/setup the subjects comboBox. If the comboBox is
* <code>null</code> a nwew one is created else the functon returns
the
* function that was returned initially.
* @return Returns the subjectsCombo.
private JComboBox getSubjectsCombo() {
if (this.subjectsCombo == null) {
this.subjectsCombo = new JComboBox();
try {
ArrayList subjects = loadSubjectsFromDatabase();
if (!subjects.isEmpty()) {
Iterator iterator = subjects.iterator();
while (iterator.hasNext()) {
// create a new subject instance
//TODO Subject subct = new Subject();
// typecast to subject
//TODO subct = (Subject) iterator.next();
String name = (String) iterator.next();
// add this subject to the comboBox
//TODO this.subjectsCombo.addItem(subct.getName());
subjectsCombo.addItem(name);
}// end while
}// end if
else {
JOptionPane.showMessageDialog(SubjectTable.this,
"Subjects List Could Not Be Filled");
System.out.println("Subjects List Could Not Be Filled");
} catch (Exception e) {
e.printStackTrace();
return this.subjectsCombo;
* Function to load subjects from the <code>Database</code>
* @return Returns the subjects.
private ArrayList loadSubjectsFromDatabase() {
// list of all the subject that the school does
ArrayList subjects = new ArrayList();
try {
//TODO to be removed later on
for (int i = 0; i < 10; i++) {
String string = new String("Subject");
string += i;
subjects.add(i, string);
// set the school subjects
//TODO subjects = Settings.getDatabase().loadAllSubjects();
} catch (Exception e1) {
e1.printStackTrace();
return subjects;
* Function to create/setup the grade comboBox. If the comboBox is
* <code>null</code> a nwew one is created else the functon returns
the
* function that was returned initially.
* @return Returns the gradeCombo.
private JComboBox getGradeCombo() {
if (this.gradeCombo == null) {
this.gradeCombo = new JComboBox();
// fill with grade 1 to 12
for (int i = 12; i > 0; i--) {
this.gradeCombo.addItem(new Integer(i).toString());
return this.gradeCombo;
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
System.out.println("Look and Feel has been set");
} catch (UnsupportedLookAndFeelException e) {
// TODO Auto-generated catch block
e.printStackTrace();
SubjectTableModel model = new SubjectTableModel();
int cols = model.getColumnCount();
int rows = model.getRowCount();
Object[][] subjects = new Object[rows][cols];
for (int row = 0; row < rows; row++) {
subjects[row][0] = new String("Subjectv ") + row;
}//for
model.setSubjectsList(subjects);
SubjectTable ttest = new SubjectTable(model);
JFrame frame = new JFrame("::Table Example");
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(ttest);
frame.getContentPane().add(scrollPane);
frame.pack();
frame.setVisible(true);
**************************************END
TABLE******************************
----------------------------THE TABLE
MODEL----------------------------------
* Created on 2005/03/21
* SubjectTableModel
package com.school.academic.ui;
import javax.swing.table.AbstractTableModel;
* Class extending the <code>AbstractTableModel</code> for use in
creating the
* <code>Subject</code>s table. In addition to the implemented methods
of
* <code>AbstractTableModel</code> The class creates a model that has
initial
* values - the values have their own <code>getter</code> and
* <code>setter</code> methods - but can still be used for values that
a user
* chooses.
* <p>
* @author Khusta
public class SubjectTableModel extends AbstractTableModel {
* Comment for <code>serialVersionUID</code>
private static final long serialVersionUID = 3257850978324461113L;
/** Column names for the subjects table */
String[] columnNames = { "Subject", "Grade", "Class Room",
"Select" };
/** Array of objects for the subjects table */
Object[][] subjectsList;
private int totalRows = 20;
protected int notEditable = 0;
* Parameterless constructor.
public SubjectTableModel() {
// TODO initialise the list
// add column to the default table model
this.subjectsList = new
Object[getTotalRows()][getColumnNames().length];
* Copy constructor with the <code>subjectList</code> to set
* @param subjects
public SubjectTableModel(Object[][] subjects) {
this(0, null, subjects, 0);
* Copy constructor with the initial number of row for the model
* @param rows -
* the initial rows of the model
* @param cols -
* the initial columns of the model
* @param subjects -
* the initial subjects for the model
* @param edit - the minimum number of columns that must be
uneditable
public SubjectTableModel(int rows, String[] cols, Object[][]
subjects, int edit) {
// set the initial rows
setTotalRows(rows);
// set the column names
setColumnNames(cols);
// set the subjectlist
setSubjectsList(subjects);
//set not editable index
setNotEditable(edit);
* Function to get the total number of columns in the table
* @return int -- the columns in the table
public int getColumnCount() {
if (this.subjectsList == null) {
return 0;
return getColumnNames().length;
* Function to get the total number of rows in the table
* @return int -- the rows in the table
public int getRowCount() {
if (this.subjectsList == null) {
return 0;
return this.subjectsList.length;
* Function to get the name of a column in the table.
* @param col --
* the column to be named
* @return String -- the column in the table
public String getColumnName(int col) {
if (getColumnNames()[col] != null) {
return getColumnNames()[col];
return new String("...");
* Function to get the value of the given row.
* @param row --
* the row of the object.
* @param col --
* the col of the object.
* @return Object -- the value at row, col.
public Object getValueAt(int row, int col) {
return getSubjectsList()[row][col];
* Function to return the data type of the given column.
* @param c --
* the column whose type must be determined.
* @return Class -- the type of the object in this col.
public Class getColumnClass(int c) {
if (getValueAt(0, c) != null) {
return getValueAt(0, c).getClass();
return new String().getClass();
* Function to put a value into a table cell.
* @param value --
* the object that will be put.
* @param row --
* the row that the object will be put.
* @param col --
* the col that the object will be put.
public void setValueAt(Object value, int row, int col) {
* TODO: Have a boolean value to determine whether to clear or
to set.
* if true clear else set.
if (value != null) {
if (getSubjectsList()[0][col] instanceof Integer
&& !(value instanceof Integer)) {
try {
getSubjectsList()[row][col] = new
Integer(value.toString());
fireTableCellUpdated(row, col);
} catch (NumberFormatException e) {
* JOptionPane .showMessageDialog( this., "The \""
+
* getColumnName(col) + "\" column accepts only
values
* between 1 - 12");
return;
System.out.println("Value = " + value.toString());
System.out.println("Column = " + col + " Row = " + row);
// column = Grade or column = Select
switch (col) {
case 2:
try {
// TODO
if (Boolean.getBoolean(value.toString()) == false
&& getValueAt(row, 0) != null
&& getValueAt(row, 1) != null
&& getValueAt(row, 2) != null) {
// subjectsList[row][col + 1] = new
Boolean(true);
System.out.println("2. false - Updated...");
* this.subjectListModel.add(row,
* this.subjectsList[row][0] + new String(" -
") +
* this.subjectsList[row][2]);
} catch (ArrayIndexOutOfBoundsException exception) {
exception.printStackTrace();
break;
case 3:
if (Boolean.getBoolean(value.toString()) == false
&& getValueAt(row, 0) != null
&& getValueAt(row, 1) != null
&& getValueAt(row, 2) != null) {
System.out.println("3. If - Added...");
getSubjectsList()[row][3] = new Boolean(true);
this.subjectListModel.addElement(this.subjectsList[row][0] +
* new String(" - ") + this.subjectsList[row][2]);
// subjectListModel.remove(row);
fireTableCellUpdated(row, col);
fireTableDataChanged();
// this.doDeleteSubject();
} else if (Boolean.getBoolean(value.toString()) ==
true
&& getValueAt(row, 0) != null
&& getValueAt(row, 1) != null
&& getValueAt(row, 2) != null) {
setValueAt("", row, col - 1);
setValueAt("", row, col - 2);
setValueAt("", row, col - 3);
System.out.println("3. Else - Cleared...");
// this.subjectListModel.remove(row);
break;
default:
break;
}// end switch
getSubjectsList()[row][col] = value;
fireTableCellUpdated(row, col);
fireTableDataChanged();
}// end if
}// end
* Function to enable edition for all the columns in the table
* @param row --
* the row that must be enabled.
* @param col --
* the col that must be enabled.
* @return boolean -- indicate whether this cell is editble or
not.
public boolean isCellEditable(int row, int col) {
if (row >= 0
&& (col >= 0 && col <= getNotEditable())) {
return false;
return true;
* Function to get the column names for the model
* @return Returns the columnNames.
public String[] getColumnNames() {
return this.columnNames;
* Function to set the column names for the model
* @param cols
* The columnNames to set.
public void setColumnNames(String[] cols) {
// if the column names are null the default columns are used
if (cols != null) {
this.columnNames = cols;
* Function to get the rows of subjects for the model
* @return Returns the subjectsList.
public Object[][] getSubjectsList() {
if (this.subjectsList == null) {
this.subjectsList = new
Object[getTotalRows()][getColumnNames().length];
return this.subjectsList;
* Function to set the subjects list for the model
* @param subjects
* The subjectsList to set.
public void setSubjectsList(Object[][] subjects) {
// if the subject list is null create a new one
// using default values
if (subjects == null) {
this.subjectsList = new
Object[getTotalRows()][getColumnNames().length];
return;
this.subjectsList = subjects;
* Function to get the total number of rows for the model. <b>NB:
</b> This
* is different to <code>
getRowCount()</code>.<code>totalRows</code>
* is the initial amount of rows that the model must have before
data can be
* added.
* @return Returns the totalRows.
* @see #setTotalRows(int)
public int getTotalRows() {
return this.totalRows;
* Function to set the total rows for the model.
* @param rows
* The totalRows to set.
* @see #getTotalRows()
public void setTotalRows(int rows) {
// if the rows are less than 0 the defaultRows are used
// set getTotalRows
if (rows > 0) {
this.totalRows = rows;
* Function to get the number of columns that is not editble
* @return Returns the notEditable.
public int getNotEditable() {
return this.notEditable;
* Function to set the number of columns that is not editable
* @param notEdit The notEditable to set.
public void setNotEditable(int notEdit) {
if (notEdit < 0) {
notEdit = 0;
this.notEditable = notEdit;
----------------------------END TABLE MODEL----------------------------------I hope you don't expect us to read hundreds of lines of unformatted code? Use the "formatting tags" when you post.
Why are you creating your own TableModel? It looks to me like the DefaultTableModel will store you data. Learn how to use JTable with its DefaultTableModel first. Then if you determine that DefaultTableModel doesn't provide the required functionality you can write your own model. -
ScrollPane can not scroll to the bottom
Help wanted:
I am using a scrollPane to display difference colored text which I used canvas to paint the text each time new text appended to it.
The problem is the scrollbar can never scoll to the bottom of the ScrollPane's viewport even though I set the scroll position to the bottom of text height.
I used:
Adjustable v = scrollpane.getVAdjustable();
System.out.println("get value:"+ v.getValue() );
The value I got is not the value I set, If I set the scrollpostion y to 300, the value I get will be 285, always, 15 difference(the font I use is 11). the maximum and minimum are always same. So the vertical scrolbar is not scroll all the way to the bottom end, actully a little apart from the bottom end. so the last line of text is not showing.
I tried everything, no use, I can not change ScrollPane....
Any solutions here??? or anyone write their own ScrollPane, I 'd appreciated for anything....
Thanks ahead!I have the same problem. I'm able to work around it if I select another message and then go back to the one that's not loading properly. So far, it always loads properly the second time. It's frustrating that I have to do that, but it works for me.
-
Not show horizontal srollbar when decrease table size
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
public class SimpleTableDemo extends JPanel {
final Object[][] data = {
{ "Mary", "Campione", "ooooooooooooooooooooooooooo", "5" },
{ "Alison", "Huml", "Rowing", "3" },
{ "Kathy", "Walrath", "Chasing toddlers", "2" },
{ "Mark", "Andrews", "Speed reading", "20" },
{ "Angela", "Lih", "Teaching high school", "4" } };
final Object[] columnNames = { "First Name", "Last Name", "Sport",
"Est. Years Experience" };
public SimpleTableDemo() {
JTable table = new JTable(data, columnNames);
// Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
scrollPane.setPreferredSize(new Dimension(400, 100));
// Add the scroll pane to this panel.
setLayout(new GridLayout(1, 0));
add(scrollPane);
public static void main(String[] args) {
JFrame frame = new JFrame("SimpleTableDemo");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.getContentPane().add("Center", new SimpleTableDemo());
// frame.setSize(400, 125);
frame.pack();
frame.setVisible(true);
}When I decrease table size the vertical scrollbar show, but horizontal srollbar NOT show. Why?When I decrease table size the vertical scrollbar show, but horizontal srollbar NOT show. Why? Because the table automatically resizes the width of each column.
If you don't want this behaviour then set the setAutoResizeMode(...) method to off. -
Text Entry Box not showing all text
I am creating a simple exercise where I would like the user to copy text from the course, paste it into word, and report back what the word count is. I thought perhaps the Text Entry Box would be the best way to go, since if you click on the existing (default) text, you can copy it. However after I place the paragraph of text in the box, and resize in the editor so that all the text shows, it does not show all the text when playing back, either previewd or published. It only shows the last few words of the last line at the top of the box.
Is there something I am missing? Or, is there an easier/better way to do what I need?
ThanksHi all
If this is Captivate 4, there may not be any need for a widget to do this. I'm guessing you haven't tried enabling the Scroll Bar for the Text Entry Box (TEB)?
When I just plop a TEB on a slide, I get this in edit view:
During playback it looks like this:
But if I edit the TEB properties and enable the Show Scrollbar option:
I get this in the output:
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcerStone Blog
Captivate eBooks -
Seeburger AS2 Adapter: "MDN not signed"
Dear all,
we just updated our test system from XI 3.0 to PI 7.1. Now we are facing a problem with our Seeburger AS2 Adapter.
I sent out a message via AS2 and get the follwing error message in Seeburger AS2 Monitor:
"MDN not signed"
In the Receiver Communication Channel I checked the Option "Sign MDN". In XI 3.0 this Scenario was working perfectly. So I contacted our communication partner and asked them if our AS2 message really contained a request for a signed MDN. Our commnucation partner confirmed and sent the MDN as text file to me. This text file shows that the MDN is signed. So it seems that the Seeburger AS2 adapter does not notice that the received MDN is a signed one. But why? Do you have an idea?
Just for testing purposes I unchecked the "Signe MDN" option. In this case the transmission finished successfully.
Who can help?
Thanks
MichaelDear Vikrant,
many thanks for your reply. But I am not sure if we are really facing the same issue as you described it in your article.
Currently we have this situation:
When I send out a message the Seeburge Workbench provides only the following error message:
"MDN not signed"
Via the Recovery Monitor I can check the received MDN. Here I can see that the MDN is signed and positive.
In the Runtime Workbench I checked the following:
1. In the Message Monitor (Adapter engine) the message is in status "System Error". Here are the details:
Message could not be forwarded to the JCA adapter. Reason: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: Negative synchron MDN received., SEEBURGER AS2: Negative synchron MDN received.
Adapter Framework caught exception: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: Negative synchron MDN received., SEEBURGER AS2: Negative synchron MDN received.
Delivering the message to the application using connection AS2_http://seeburger.com/xi failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: Negative synchron MDN received., SEEBURGER AS2: Negative synchron MDN received..
2. The Communication Channel Monitor shows the following error messages:
Error type: REPORT_ERROR >> Error date: 12/14/10 12:02 PM >> Description: MDN not signed [12/14/10 12:02 PM]
Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: Negative synchron MDN received., SEEBURGER AS2: Negative synchron MDN received.
I do not understand why the MDN is recognized as negative and unsigned even if the plain text version of the MDN shows that it is signed and positive.
In your article you recommend to create a sender communication channel for MDN and a corresponding sender agreement. We already did that in XI 3.0 to forward the MDN as STATUS IDOC to SAP ECC.
Maybe you have an additional idea?
Thanks
Michaek -
I hope someone can help me with this,
I am using external XML in 3 dynamic text boxes all 3 have a
UIScrollBar attached, when I play the movie In the IDE the
scrollbars all show up as they should but if I put the swf file in
a HTML page the Arrow Up, Arrow down and the thumb do not show up
so I have no scrolling. Any Ideas why this would be happening
?"Ipod not showing up on Itunes."
Try these.
iPod appears in Windows Explorer but does not appear in iTunes.
iPod does not appear in iTunes.
Fast user switching in Windows XP is not supported.
Strange iPod behavior.
When restoring the iPod, put it into disk mode first.
Putting iPod into disk mode. -
Small u-tilde not showing in textField
Hi all,
I have a problem with the u-tilde not showing in a textfield.
I need to display all sorts of chars with different accents,
and they
all show, except for u-tilde.
I suppose it is not a widely used char since it isn't even
listed in
HTML latin 1 entity lists (like:
http://w3schools.com/tags/ref_entities.asp)
but, well, some people need
it...
Test below show it's really an oddball since all other chars
with a
tilde show.
Weird thing is: removing the TextFormat (or just the line
with
embedfonts) all together shows all three instances of the
u-tilde.
Anyone have a clue as to how to get it to show?
(actual used code is with loading an UTF-8 encoded XML file.
No show
either.)
thanks in advance,
Manno
AS2 code as example
fontsymbol with linkageID "my_palentino" is in library
var tf:TextFormat = new TextFormat();
tf.font = "my_palentino";
tf.size = 28;
var t:TextField = this.createTextField( "test_txt", 1, 0, 0,
500, 100 );
t.embedFonts = true;
t.html = true;
t.htmlText = "<p>abc - ũÅ© -
ãñ - \u0169</p>";
t.setTextFormat( tf );
Manno Bult
http://www.aloft.nlHi all,
Not to bumb the thread (well maybe...) but could anybody say
something
conclusive about the following:
* Is it true that fontsymbols do only include basic latin as
stated
here:
http://tekkie.flashbit.net/flash/embedding-fonts-in-flash-cs3
* Is it true the u-tilde char is not a part of basic latin?
(i think I
can guess this...)
It seems a solution to my problem is:
- creating a textfield for each style (bold, italic etc.) to
use
- embed fonts through the properties panel for each field
- use css to do text formatting
It requires 'some' changes to the file though :(
thanks in advance,
Manno
Manno Bult wrote:
>
> Hi all,
>
> I have a problem with the u-tilde not showing in a
textfield.
>
> I need to display all sorts of chars with different
accents, and they
> all show, except for u-tilde.
>
> I suppose it is not a widely used char since it isn't
even listed in
> HTML latin 1 entity lists (like:
>
http://w3schools.com/tags/ref_entities.asp)
but, well, some people need
> it...
>
> Test below show it's really an oddball since all other
chars with a
> tilde show.
> Weird thing is: removing the TextFormat (or just the
line with
> embedfonts) all together shows all three instances of
the u-tilde.
>
> Anyone have a clue as to how to get it to show?
>
> (actual used code is with loading an UTF-8 encoded XML
file. No show
> either.)
>
> thanks in advance,
> Manno
>
> /*
> AS2 code as example
> fontsymbol with linkageID "my_palentino" is in library
> */
> var tf:TextFormat = new TextFormat();
> tf.font = "my_palentino";
> tf.size = 28;
>
> var t:TextField = this.createTextField( "test_txt", 1,
0, 0, 500, 100 );
> t.embedFonts = true;
> t.html = true;
> t.htmlText = "<p>abc - ũÅ© -
ãñ - \u0169</p>";
> t.setTextFormat( tf );
>
>
Manno Bult
http://www.aloft.nl
Maybe you are looking for
-
Shadow tables in owb 10.2.0.2.8
Hi all, I have a problem with creating shadow tables in patch set 10.2.0.2.8. If I recalled correctly, I did manage to create them with no issues in another version of owb: 10.2.0.3. Can I just verify that this current patchset 10.2.0.2.8 does not su
-
hi i used the 0PURC01 and with extractor 2LIS_02_SCL and i don't know how i can mapping 0IR_VAL_RET ( Invoiced amount, returns) and (0IR_QTY_RET Invoice receipt quantity, returns) with extrator 2LIS_02_SCL best regard francoise
-
Had "closed connection" when connect via enterprise manager
Hello, please help..... I installed OEM version 10.1.0.2.0 on windows 2000 PC. All the database instances are displayed under Network Navigator. when i log on to the database either as normal / sysoper /sysdba, I got "closed connection" error right a
-
Text selection tool is too bad since many years ago
selected easily in skim on MAC selected dont know what in acrobatX on MAC - -b
-
Where do i find a unlock code?
I have software in my palm, but it says i need a unlock code, and i dont know where to find that. Post relates to: Tungsten E2 Post relates to: Tungsten E2