My JTree is ugly, please help
i want to add nodes to tree with nice style, that is:
windows c++ calls the style as "has button and lines start at root".
in other words, a small box with cross lines on the left side of label (node).
(i can't find tree sample with the style).
if u know, pleasde show me key code or web site.
thanks for my helpers in advance
i want to add nodes to tree with nice style, that is:
windows c++ calls the style as "has button and lines
start at root".
in other words, a small box with cross lines on the
left side of label (node).
(i can't find tree sample with the style).
if u know, pleasde show me key code or web site.
thanks for my helpers in advance
Sun has a tutorial on Swing JTree that might interest you:
http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
Similar Messages
-
JTree not Updating - please help
I am totally perplexed.
I created a pretty standard implmentation of a JTree, utilizing the DefaultTreeModel, DefaultMutableTreeNodes, etc. The JTree is contained in a JScrollPane. The tree displays a string value that is one of the properties of the UserObject of the node, for which purpose I created my own subclass renderer and an editor. A JButton causes a new node to be added to the root node. All was working fine, until...
I put the JTree and the TreeModel in a new class, along with the method to populate it. I created a method that passes a handle to the JTree ("getTree()") which I use to instantiate the JScrollPane ("new JScrollPane(tree)"). Now when I add a node to the root, it doesn't display!
I have tried "tree.revalidate()", "tree.updateUI()", "scrollpane.revalidate()", "tree.repaint()", "dialog.repaint()" all to no avail. If I close the dialog and reopen it, everything displays fine.
Can anyone tell me what I'm doing wrong?
Thanks very much...Here are the two classes. Your help is greatly appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import java.util.*;
public class CategoryMaintFrame extends AnyInternalFrame {
private JDesktopPane desktop;
private JFrame parentFrame;
// CENTER
private JScrollPane scroller;
private CategTree categTree;
private JTree cTree;
private DefaultTreeModel theModel;
// SOUTH
private JPanel buttonPanel;
private JButton addRootButton;
private JButton cancelButton;
private JButton okButton;
private ActionListener al;
// OTHER PROPERTIES
private Project theProject;
private AllCategories theCategs;
private DefaultMutableTreeNode theRoot;
private CategoryPopUp popUpMenu;
// CONSTRUCTOR
public CategoryMaintFrame(JDesktopPane pane, AllCategories categs, Project proj) {
super("Global and Project-Specific Categories");
desktop = pane;
parentFrame = (JFrame) pane.getParent().getParent().getParent();
theCategs = categs;
theProject = proj;
this.getContentPane().setLayout(new BorderLayout());
buildGUI();
setButtonListeners();
setSize(400,300);
addInternalFrameListener(new InternalFrameAdapter() {
public void InternalFrameClosing(WindowEvent we) {
CategoryMaintFrame.this.dispose();
desktop.add(this);
setVisible(true);
private void buildGUI() {
// NORTH, EAST & WEST
JLabel fillerW = new JLabel("");
fillerW.setPreferredSize(new Dimension(20,20));
this.getContentPane().add(fillerW, BorderLayout.WEST);
JLabel fillerE = new JLabel("");
fillerE.setPreferredSize(new Dimension(20,20));
getContentPane().add(fillerE, BorderLayout.EAST);
JLabel fillerN = new JLabel("");
fillerN.setPreferredSize(new Dimension(20, 20));
getContentPane().add(fillerN, BorderLayout.NORTH);
// CENTER: TREE
// the Root is a non-data-based node created to root all of
// the category trees
theRoot = new DefaultMutableTreeNode("theRoot");
categTree = new CategTree(theCategs, theProject);
cTree = categTree.getTree();
cTree.setEditable(true);
cTree.setRootVisible(true);
theModel = (DefaultTreeModel) cTree.getModel();
scroller = new JScrollPane(categTree.getTree());
this.getContentPane().add(scroller, BorderLayout.CENTER);
// SOUTH: BUTTONS
buttonPanel = new JPanel();
addRootButton = new JButton("Add Root");
buttonPanel.add(addRootButton);
okButton = new JButton("Done");
buttonPanel.add(okButton);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
private void setButtonListeners() {
al = new ActionListener() {
public void actionPerformed(ActionEvent ae) {
if (ae.getActionCommand() == "Add Root") {
Category newCateg = new Category();
newCateg.setTitle("<un-named>");
newCateg.setProjectID(new Integer(0));
newCateg.setProject(new Project(0));
newCateg.setIsRoot(true);
theCategs.addCategory(newCateg);
DefaultMutableTreeNode newRoot = new DefaultMutableTreeNode(newCateg);
((DefaultTreeModel) cTree.getModel()).insertNodeInto(newRoot,
theRoot, theRoot.getChildCount());
theModel.reload(newRoot);
} else if (ae.getActionCommand() == "Done") {
CategoryMaintFrame.this.dispose();
addRootButton.addActionListener(al);
okButton.addActionListener(al);
popUpMenu = new CategoryPopUp(theCategs, parentFrame, theProject);
cTree.addMouseListener(popUpMenu);
((DefaultTreeModel) cTree.getModel()).addTreeModelListener(new MyTreeModelListener());
class MyTreeModelListener implements TreeModelListener {
public void treeNodesChanged(TreeModelEvent e) {
System.out.println("model change detected");
DefaultMutableTreeNode node;
node = (DefaultMutableTreeNode)
(e.getTreePath().getLastPathComponent());
* If the event lists children, then the changed
* node is the child of the node we've already
* gotten. Otherwise, the changed node and the
* specified node are the same.
try {
int index = e.getChildIndices()[0];
node = (DefaultMutableTreeNode)
(node.getChildAt(index));
} catch (NullPointerException exc) {}
Category chgdCateg = (Category) node.getUserObject();
theCategs.changeCategory(chgdCateg);
public void treeNodesInserted(TreeModelEvent e) {
System.out.println("model insert detected");
DefaultMutableTreeNode node;
node = (DefaultMutableTreeNode) e.getTreePath().getLastPathComponent();
if (!node.isRoot()) { // the root of the tree isn't a category; if
// we added a node without a parent (a root category),
// don't create a category relationship
Category parCateg = (Category) node.getUserObject();
try {
int index = e.getChildIndices()[0];
node = (DefaultMutableTreeNode) node.getChildAt(index);
Category addCateg = (Category) node.getUserObject();
theCategs.addCategory(addCateg);
theCategs.addCategoryRelation(parCateg, addCateg);
} catch (NullPointerException exc) {}
public void treeNodesRemoved(TreeModelEvent e) {
System.out.println("model remove detected");
DefaultMutableTreeNode anode, bnode;
anode = (DefaultMutableTreeNode) e.getTreePath().getLastPathComponent();
// get all of the children (not just immediate children) of the parent and
// delete them
Category delCateg;
Vector allChildren = new Vector();
Object[] nodeChildren = e.getChildren();
// load the immediate children into a vector
for (int i = 0; i < nodeChildren.length; i++) {
anode = (DefaultMutableTreeNode) nodeChildren;
allChildren.addElement(anode);
boolean moreChildren = true;
int i = 0;
// iterate thru the vector, deleting the Categories, and adding their
// children (if any) the end of the vector so they are likewise deleted
while (moreChildren) {
anode = (DefaultMutableTreeNode) allChildren.elementAt(i);
delCateg = (Category) anode.getUserObject();
// get this node's children, and store then in the vector
Enumeration en = anode.children();
while(en.hasMoreElements()) {
bnode = (DefaultMutableTreeNode) en.nextElement();
allChildren.addElement(bnode);
theCategs.removeCategoryRelation(delCateg, (Category) bnode.getUserObject());
// delete it from the collection and the database
theCategs.deleteCategory(delCateg);
delCateg = null;
anode = null;
i++;
if (i >= allChildren.size())
moreChildren = false;
public void treeStructureChanged(TreeModelEvent e) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import java.awt.*;
import javax.swing.*;
import javax.swing.tree.*;
import java.util.*;
public class CategTree {
private JTree cTree;
private DefaultTreeModel theModel;
private Project theProject;
private AllCategories theCategs;
private DefaultMutableTreeNode theRoot;
// CONSTRUCTOR
public CategTree(AllCategories categs, Project proj) {
super();
theCategs = categs;
theProject = proj;
// the Root is a non-data-based node created to root all of
// the category trees
theRoot = new DefaultMutableTreeNode("theRoot");
theModel = new DefaultTreeModel(theRoot);
cTree = new JTree(theModel);
CategoryNodeRenderer cnr = new CategoryNodeRenderer();
cnr.setPreferredSize(new Dimension(200,20));
cTree.setCellRenderer(cnr);
cTree.setCellEditor(new CategoryNodeEditor(cTree, cnr, theCategs));
cTree.setEditable(false);
cTree.setRootVisible(false);
cTree.setExpandsSelectedPaths(true);
cTree.setScrollsOnExpand(true);
cTree.setShowsRootHandles(true);
cTree.setToggleClickCount(0);
cTree.setVisibleRowCount(20);
initializeTreeModel();
public DefaultTreeModel getTreeModel() {
return theModel;
public JTree getTree() {
return cTree;
public DefaultMutableTreeNode getRootNode() {
return theRoot;
public void initializeTreeModel() {
Vector allNodes = new Vector();
// insert all of the root categories in the root of the tree and
// store a ref to the node in a vector
Vector allRoots = theCategs.getAllRoots(theProject);
for (int i = 0; i < allRoots.size(); i++) {
Category nextRoot = (Category) allRoots.elementAt(i);
DefaultMutableTreeNode nextNode = new DefaultMutableTreeNode(nextRoot);
theModel.insertNodeInto(nextNode, theRoot, theRoot.getChildCount());
allNodes.addElement(nextNode);
// now insert the children of each node in the vector in the tree, and store
// it in the vector, incrementing to the end of the vector
// int totalNodes = theCategs.getCategoryCount();
boolean moreNodes = allNodes.size() > 0? true : false;
int i = 0;
while (moreNodes) {
DefaultMutableTreeNode nextParent = (DefaultMutableTreeNode) allNodes.elementAt(i);
Category parentCateg = (Category) nextParent.getUserObject();
Vector children = theCategs.getParentsChildren(parentCateg, theProject);
for (int j = 0; j < children.size(); j++) {
Category nextChild = (Category) children.elementAt(j);
DefaultMutableTreeNode nextNode = new DefaultMutableTreeNode(nextChild);
theModel.insertNodeInto(nextNode, nextParent, nextParent.getChildCount());
allNodes.addElement(nextNode);
i++;
if (i >= allNodes.size())
moreNodes = false;
theModel.reload();
public void expandAllPaths() {
Enumeration e= theRoot.depthFirstEnumeration();
while (e.hasMoreElements()) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.nextElement();
cTree.makeVisible(new TreePath(node.getPath())); -
Hi,
I created a JTree where the DefaultMutableTreeNode is created at run time and for this node, the leaf items are added dynamically.....Now my problem is, I should get a popup menu when i click on the treenode particularly-----
* Node1
-------Node11
-------Child1
In this I want a popup only for the Node11 & its child elements if there is any Node2 also i don't want a popup and also for Node1 i don't want, when I am trying this I am getting the Popup to all nodes and child elements, please, help me any one who cross over this problem.............
Thanks In Advance,
Regards,
SarikakiranFirstly, do you know how to detect the right click? (Use a MouseListener.)
When you receive the MouseEvent for the right-click, you can get the coordinates of the click (i.e. where on the JTree the mouse was clicked).
You can then use JTree.getPathForLocation to get the path for the clicked node, which is a TreePath object. Use TreePath.getLastPathComponent to find which node was actually clicked on.
Having determined which node was clicked, you can then make a decision about whether to show a popup menu. -
Is it possible to add a JComponent as a JTree node? If yes then please help
I am writing a java program in which I want to make my tree nodes editable by adding textfields, comboboxes, radiobuttons as nodes to the tree. So if anyone has any soluition please help!!!
"Search Forums"
has a wealth of information, and should be your first action when seeking a solution
here's the results of searching, keywords: JTree JTextField
http://onesearch.sun.com/search/onesearch/index.jsp?qt=Jtree+JTextfield&subCat=&site=dev&dftab=&chooseCat=javaall&col=developer-forums
plenty of the hits will have sample code you should be able to modify for your own needs -
Please help with JTree.setSelectionPath
Hi....i have a split window, with a JTree on the left and a heap of small pic on the right. If i select any node in the tree, my program can highlight the corresponding pic on the right. Now, my problem is how to select the tree node, if i select the pic on the right first.
I tried to use setSelectionPath(TreePath)...but i couldnt get the TreePath. I also tried to create a new path, by
TreePath path1 = new TreePath(Object[]{root, object1});
where, object1 is the selected object from the right split (the pic)
Please help me...thanx a lot !!Please go to
http://forums.java.sun.com/thread.jsp?forum=57&thread=164386
Hope this will help u -
My keys on my macbook are kinda like sticking down and make a ugly noise please help me
Hello , my keys on my macbook pro 2011 13" i7 500 gb are stucking and making a weird noise I dont know what to do ,
1. How to fix it
or 2. Send it back and tell the ( macmall ) seller to reclaim it or something please help meee .Your code is absolutely unreadable - even if someone was willing to
help, it's simply impossible. I do give you a few tips, though: If you
understand your code (i.e. if it really is YOUR code), you should be
able to realize that your minimum and maximum never get set (thus they
are both 0) and your exam 3 is set with the wrong value. SEE where
those should get set and figure out why they're not. Chances are you
are doing something to them that makes one 'if' fail or you just
erroneously assign a wrong variable! -
Please help with JTree Node Duplication
Iam building a JTree which should not allow node duplication.
1.)First i construct a ArrayList which stores all the previous nodes.
treeNodeNames=new ArrayList();
2.)i call the method
readTreeNodeNames((DefaultMutableTreeNode)dtm.getRoot());
3.)The method readTreeNodeNames is
public void readTreeNodeNames(DefaultMutableTreeNode node) {
if(node.toString().toLowerCase().length()!=0) {
treeNodeNames.add(node.toString().toLowerCase());
for(Enumeration en=node.children();en.hasMoreElements();) {
DefaultMutableTreeNode childNode=(DefaultMutableTreeNode)en.nextElement();
if(childNode.toString().toLowerCase().length()!=0) {
treeNodeNames.add(childNode.toString().toLowerCase());
if(!childNode.isLeaf()) {
readTreeNodeNames(childNode);
4.)i have four menu when right click a node add,modify,add subnode,delete.
node duplication fails in my case.when should i call this method?should i call while doing every above mentioned operations or in TreeModelEvent implementations?
i have mailed this problem already two times.but no one has not replied.Kinldy consider it and give me a solution.Or anyone having code for JTree Node duplication please send me to [email protected]Hi all,
Any ideas to overcome this problem.?
Thanks,
Krish -
Scroll bar problems ..Please help!!!!!!
This is what the program looks like. topPanel has newItemPanel on top of it. when you click continue newItemPanel becomes invisible and newItemDescriptionPanel becomes visible. When you click continue newItemDescriptionPanel becomes invisible and priceEnterPanel becomes visible.
I want newItemDescriptionPanel and priceEnterPanel to have a scroll bar. but everything I have tried hasn't worked. I am new. You will see the code is ugly and there is an attempt to add a scrollbar.
Please help
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.lang.System;
public class MainPanel extends JFrame implements ActionListener
private boolean firstRun = true;
private final int ITEM_PLAIN = 0; // Item types
private final int ITEM_CHECK = 1;
private final int ITEM_RADIO = 2;
private JPanel topPanel;
private JPanel newItemPanel;
private JRadioButton onlineAuctionRadio;
private JRadioButton fixedPriceRadio;
private ButtonGroup bg;
private JButton continueButton;
private JLabel blankLabel; //used to give space between things
private JPanel newItemDescriptionPanel;
private JPanel takeAdditionalSpacePanelCheckBox;
private JPanel takeAdditionalSpacePanel;
private JPanel takeAdditionalSpacePanelLabel;
private JPanel takeAdditionalSpacePanelLabel2;
private JPanel takeAdditionalSpacePanel2;
private JPanel takeAdditionalSpacePanel3;
private JPanel takeAdditionalSpacePanel4;
private JPanel takeAdditionalSpacePanel5;
JScrollPane displayScroller;
JEditorPane itemDescriptionTextArea;
GridBagLayout gridbag;
GridBagConstraints gbc;
private JCheckBox secondCategoryCheckBox;
private JLabel itemTitleLabel;
private JLabel requiredLabel, requiredLabel2;
private JLabel requiredStarLabel;
private JTextField itemTitleTextField;
private JLabel subtitleLabel;
private JTextField subtitleTextField;
private JLabel itemDescriptionLabel;
private JButton itemDescriptionContinueButton;
private JLabel percentageLabel;
//------- price enter page ----------------
private JLabel startingPriceLabel;
private JLabel dollarSignLabel;
private JTextField startingPriceTextField;
private JPanel fillUpSpacePanel;
private JPanel fillUpSpacePanel1;
private JPanel fillUpSpacePanel2;
private JLabel buyItNowLabel;
private JPanel fillUpSpacePanel3;
private JLabel dollarSignLabel2;
private JTextField buyItNowTextField;
private JPanel fillUpSpacePanel4;
private JPanel fillUpSpacePanel5;
private JPanel fillUpSpacePanel6;
private JPanel fillUpSpacePanel7;
private JPanel fillUpSpacePanel8;
private JPanel fillUpSpacePanel9;
private JPanel fillUpSpacePanel10;
private JPanel fillUpSpacePanel11;
private JPanel fillUpSpacePanel12;
private JPanel fillUpSpacePanel13;
private JPanel fillUpSpacePanel14;
private JPanel fillUpSpacePanel15;
private JPanel fillUpSpacePanel16;
private JPanel fillUpSpacePanel17;
private JPanel fillUpSpacePanel18;
private JLabel donatePercentageLabel;
private JTextField donatePercentageTextField;
private JPanel fSp; // fill space panel
private JPanel fSp1;
private JPanel fSp2;
private JPanel fSp3;
private JPanel fSp4;
private JPanel fSp5;
private JPanel fSp6;
private JPanel fSp7;
private JPanel fSp8;
private JPanel fSp9;
private JLabel numberOfPicturesLabel;
private JTextField numberOfPicturesTextField;
private JCheckBox superSizePicturesCheckBox;
private JLabel superSizePicturesLabel;
private JRadioButton standardPictureRadioButton;
private JRadioButton picturePackRadioButton;
private JCheckBox listingDesignerCheckBox;
private ButtonGroup bgPictures;
private JCheckBox valuePackCheckBox;
private JCheckBox galleryPictureCheckBox;
private JCheckBox subtitleCheckBox;
private JCheckBox boldCheckBox;
private JCheckBox borderCheckBox;
private JCheckBox highlightCheckBox;
private JCheckBox featuredPlusCheckBox;
private JCheckBox galleryFeaturedCheckBox;
private JLabel homePageFeaturedLabel;
private JComboBox homePageFeaturedComboBox;
private JCheckBox giftCheckBox;
JScrollPane priceEnterPanelScroll;
private JButton backToRadioButton;
private JButton backToItemDescriptionButton;
private JPanel priceEnterPanel;
private final static String RADIOPANEL = "JPanel with radios";
private final static String DESCRIPTIONPANEL = "JPanel with description";
private final static String PRICEENTERPANEL = "JPanel with price entering";
private JPanel cards;
private JMenuBar menuBar;
private JMenu menuFile;
private JMenu menuEdit;
private JMenu menuProperty;
private JMenuItem menuPropertySystem;
private JMenuItem menuPropertyEditor;
private JMenuItem menuPropertyDisplay;
private JMenu menuFileNew;
private JMenuItem menuFileNewAccount;
private JMenuItem menuFileNewItem;
private JMenuItem menuFileOpen;
private JMenuItem menuFileSave;
private JMenuItem menuFileSaveAs;
private JMenuItem menuFileExit;
private JMenuItem menuEditCopy;
private JMenuItem menuEditCut;
private JMenuItem menuEditPaste;
public MainPanel()
requiredLabel = new JLabel ("* Required");
requiredLabel.setForeground (Color.red);
requiredLabel2 = new JLabel ("* Required");
requiredLabel2.setForeground (Color.red);
requiredStarLabel = new JLabel ("*");
requiredStarLabel.setForeground (Color.green);
setTitle( "photo galleries" );
setSize( 310, 130 );
topPanel = new JPanel();
topPanel.setLayout( new BorderLayout() );
topPanel.setBorder (BorderFactory.createTitledBorder ("TopPanel"));
//topPanel.setPreferredSize(new Dimension (300,300));
getContentPane().add( topPanel );
topPanel.setVisible (false);
// For New Item Panel
ButtonListener ears = new ButtonListener();
blankLabel = new JLabel (" "); // used to give space between radio buttons and continue button
continueButton = new JButton ("Continue >");
continueButton.addActionListener (ears);
backToRadioButton = new JButton ("< back");
backToRadioButton.addActionListener (ears);
itemDescriptionContinueButton = new JButton ("Continue >");
itemDescriptionContinueButton.addActionListener (ears);
backToItemDescriptionButton = new JButton ("< back");
backToItemDescriptionButton.addActionListener (ears);
newItemPanel = new JPanel();
newItemPanel.setLayout (new BoxLayout(newItemPanel, BoxLayout.Y_AXIS));
//topPanel.add (newItemPanel, BorderLayout.NORTH);
newItemPanel.setBorder (BorderFactory.createTitledBorder ("NewItemPanel"));
newItemPanel.setVisible (false);
onlineAuctionRadio = new JRadioButton ("Sold item at online Auction" );
fixedPriceRadio = new JRadioButton ("Sold at a Fixed Price");
bg = new ButtonGroup();
bg.add(onlineAuctionRadio);
bg.add(fixedPriceRadio);
onlineAuctionRadio.addActionListener (ears);
fixedPriceRadio.addActionListener (ears);
newItemPanel.add (onlineAuctionRadio);
newItemPanel.add (fixedPriceRadio);
newItemPanel.add (blankLabel);
newItemPanel.add (continueButton);
// ------ After continue pressed ---------
newItemDescriptionPanel = new JPanel();
newItemDescriptionPanel.setLayout (new BoxLayout(newItemDescriptionPanel, BoxLayout.Y_AXIS));
newItemPanel.add (newItemDescriptionPanel, BorderLayout.NORTH);
newItemDescriptionPanel.setBorder (BorderFactory.createTitledBorder ("newItemDescriptionPanel"));
secondCategoryCheckBox = new JCheckBox ("The item was listed in a second category");
newItemDescriptionPanel.setVisible (false);
itemTitleLabel = new JLabel ("Item title");
itemTitleTextField = new JTextField (30);
subtitleLabel = new JLabel ("Subtitle ($0.50)");
subtitleTextField = new JTextField (30);
itemDescriptionLabel = new JLabel ("Item description");
itemDescriptionTextArea = new JEditorPane();
itemDescriptionTextArea.setContentType( "text/html" );
itemDescriptionTextArea.setEditable( false );
itemDescriptionTextArea.setPreferredSize(new Dimension (500,250));
itemDescriptionTextArea.setFont(new Font( "Serif", Font.PLAIN, 12 ));
itemDescriptionTextArea.setForeground( Color.black );
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 4;
displayScroller = new JScrollPane( itemDescriptionTextArea );
gridbag = new GridBagLayout ();
gridbag.setConstraints( displayScroller, gbc );
itemDescriptionTextArea.setEditable( true );
takeAdditionalSpacePanelCheckBox = new JPanel(new FlowLayout(FlowLayout.LEFT));
takeAdditionalSpacePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanelLabel = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanelLabel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
takeAdditionalSpacePanel5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
//takeAdditionalSpacePanel2.setBorder (BorderFactory.createTitledBorder ("Additonal 2"));
takeAdditionalSpacePanelCheckBox.add (secondCategoryCheckBox);
newItemDescriptionPanel.add (takeAdditionalSpacePanelCheckBox);
//newItemDescriptionPanel.add (blankLabel);
takeAdditionalSpacePanelLabel.add (itemTitleLabel);
takeAdditionalSpacePanelLabel.add (requiredLabel);
newItemDescriptionPanel.add (takeAdditionalSpacePanelLabel);
//newItemDescriptionPanel.add (itemTitleTextField);
takeAdditionalSpacePanel.add(itemTitleTextField);//<--add textfield to panel
newItemDescriptionPanel.add (takeAdditionalSpacePanel);//<--add panel to boxlayout panel
takeAdditionalSpacePanelLabel2.add (subtitleLabel);
newItemDescriptionPanel.add (takeAdditionalSpacePanelLabel2);
takeAdditionalSpacePanel2.add (subtitleTextField);
newItemDescriptionPanel.add (takeAdditionalSpacePanel2);
takeAdditionalSpacePanel4.add (itemDescriptionLabel);
//takeAdditionalSpacePanel4.add (requiredLabel2);
newItemDescriptionPanel.add (takeAdditionalSpacePanel4);
takeAdditionalSpacePanel3.add (displayScroller);
newItemDescriptionPanel.add (takeAdditionalSpacePanel3);
takeAdditionalSpacePanel5.add (backToRadioButton);
takeAdditionalSpacePanel5.add (itemDescriptionContinueButton);
newItemDescriptionPanel.add (takeAdditionalSpacePanel5);
//newItemDescriptionPanel.setLayout (new BoxLayout(newItemDescriptionPanel, BoxLayout.Y_AXIS));
//----------- Price Enter Page ----------------
priceEnterPanel = new JPanel();
priceEnterPanel.setLayout (new BoxLayout(priceEnterPanel, BoxLayout.Y_AXIS));
newItemDescriptionPanel.add (priceEnterPanel, BorderLayout.NORTH);
priceEnterPanel.setBorder (BorderFactory.createTitledBorder ("Price enter Panel"));
priceEnterPanel.setVisible (false);
priceEnterPanelScroll = new JScrollPane (priceEnterPanel);
topPanel.add (priceEnterPanelScroll);
standardPictureRadioButton = new JRadioButton ("Standard");
picturePackRadioButton = new JRadioButton ("Picture Pack ($1.00 for up to 6 pictures or $1.50 for 7 to 12 pictures)");
bgPictures = new ButtonGroup();
bgPictures.add(standardPictureRadioButton);
bgPictures.add(picturePackRadioButton);
standardPictureRadioButton.addActionListener (ears);
picturePackRadioButton.addActionListener (ears);
superSizePicturesCheckBox = new JCheckBox ("Supersize Pictures ($0.75)");
listingDesignerCheckBox = new JCheckBox ("Listing designer $0.10");
valuePackCheckBox = new JCheckBox ("Get the Essentials for less! Gallery, Subtitle, Listing Designer. $0.65 (save $0.30)");
superSizePicturesCheckBox.setEnabled (false);
superSizePicturesCheckBox.addActionListener (ears);
listingDesignerCheckBox.addActionListener (ears);
valuePackCheckBox.addActionListener (ears);
startingPriceLabel = new JLabel ("Starting Price");
dollarSignLabel = new JLabel ("$");
startingPriceTextField = new JTextField (10);
buyItNowLabel = new JLabel ("Buy It Now");
dollarSignLabel2 = new JLabel ("$");
buyItNowTextField = new JTextField (10);
donatePercentageLabel = new JLabel ("Donate percentage of sale");
donatePercentageTextField = new JTextField (2);
donatePercentageTextField.setText ("0");
percentageLabel = new JLabel ("%");
// Right-justify the text
donatePercentageTextField.setHorizontalAlignment(JTextField.RIGHT);
numberOfPicturesLabel = new JLabel ("Number of pictures used");
numberOfPicturesTextField = new JTextField (1);
numberOfPicturesTextField.setText ("0");
galleryPictureCheckBox = new JCheckBox ("Gallery ($0.35) [Requires a picture]");
subtitleCheckBox = new JCheckBox ("Subtitle ($0.50)");
boldCheckBox = new JCheckBox ("Bold ($1.00)");
borderCheckBox = new JCheckBox ("Border ($3.00)");
highlightCheckBox = new JCheckBox ("Highlight ($5.00)");
featuredPlusCheckBox = new JCheckBox ("Featured Plus! ($19.95)");
galleryFeaturedCheckBox = new JCheckBox ("Gallery Featured ($19.95) [Requires a picture]");
homePageFeaturedLabel = new JLabel ("Home Page Featured ($39.95 for 1 item, $79.95 for 2 or more items)");
homePageFeaturedComboBox = new JComboBox ();
homePageFeaturedComboBox.addItem (("None..."));
homePageFeaturedComboBox.addItem (("1 item"));
homePageFeaturedComboBox.addItem (("2 or more items"));
giftCheckBox = new JCheckBox ("Show as a gift ($0.25)");
fillUpSpacePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel6 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel7 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel8 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel9 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel10 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel11 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel12 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel13 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel14 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel15 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel16 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel17 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel18 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp6 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp7 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp8 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp9 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel.add (startingPriceLabel);
fillUpSpacePanel.add (requiredLabel2);
priceEnterPanel.add (fillUpSpacePanel);
fillUpSpacePanel2.add (dollarSignLabel);
fillUpSpacePanel2.add (startingPriceTextField);
priceEnterPanel.add (fillUpSpacePanel2);
// fillUpSpacePanel1.add (backToItemDescriptionButton);
// priceEnterPanel.add (fillUpSpacePanel1);
fillUpSpacePanel3.add (buyItNowLabel);
priceEnterPanel.add (fillUpSpacePanel3);
fillUpSpacePanel4.add (dollarSignLabel2);
fillUpSpacePanel4.add (buyItNowTextField);
priceEnterPanel.add (fillUpSpacePanel4);
fillUpSpacePanel1.add (donatePercentageLabel);
priceEnterPanel.add (fillUpSpacePanel1);
fillUpSpacePanel5.add (donatePercentageTextField);
fillUpSpacePanel5.add (percentageLabel);
priceEnterPanel.add (fillUpSpacePanel5);
fillUpSpacePanel6.add (numberOfPicturesLabel);
priceEnterPanel.add (fillUpSpacePanel6);
fillUpSpacePanel7.add (numberOfPicturesTextField);
priceEnterPanel.add (fillUpSpacePanel7);
fillUpSpacePanel8.add (standardPictureRadioButton);
priceEnterPanel.add (fillUpSpacePanel8);
fillUpSpacePanel10.add (blankLabel);
fillUpSpacePanel10.add (superSizePicturesCheckBox);
priceEnterPanel.add (fillUpSpacePanel10);
fillUpSpacePanel9.add (picturePackRadioButton);
priceEnterPanel.add (fillUpSpacePanel10);
fillUpSpacePanel11.add (picturePackRadioButton);
priceEnterPanel.add (fillUpSpacePanel11);
fillUpSpacePanel12.add (listingDesignerCheckBox);
priceEnterPanel.add (fillUpSpacePanel12);
fillUpSpacePanel13.add (valuePackCheckBox);
priceEnterPanel.add (fillUpSpacePanel13);
fSp.add (galleryPictureCheckBox);
priceEnterPanel.add (fSp);
fSp1.add (subtitleCheckBox);
priceEnterPanel.add (fSp1);
fSp2.add (boldCheckBox);
priceEnterPanel.add (fSp2);
fSp3.add (borderCheckBox);
priceEnterPanel.add (fSp3);
fSp4.add (highlightCheckBox);
priceEnterPanel.add (fSp4);
fSp5.add (featuredPlusCheckBox);
priceEnterPanel.add (fSp5);
fSp6.add (galleryFeaturedCheckBox);
priceEnterPanel.add (fSp6);
fSp7.add (homePageFeaturedLabel);
priceEnterPanel.add (fSp7);
fSp8.add (homePageFeaturedComboBox);
priceEnterPanel.add (fSp8);
fSp9.add (giftCheckBox);
priceEnterPanel.add (fSp9);
newItemDescriptionPanel.add (priceEnterPanelScroll);
//Create the panel that contains the "cards".
cards = new JPanel(new CardLayout());
cards.add(newItemPanel, RADIOPANEL);
cards.add(newItemDescriptionPanel, DESCRIPTIONPANEL);
cards.add(priceEnterPanel, PRICEENTERPANEL);
topPanel.add(cards, BorderLayout.NORTH);
// Create the menu bar
menuBar = new JMenuBar();
// Set this instance as the application's menu bar
setJMenuBar( menuBar );
// Build the property sub-menu
menuProperty = new JMenu( "Properties" );
menuProperty.setMnemonic( 'P' );
// Create property items
menuPropertySystem = CreateMenuItem( menuProperty, ITEM_PLAIN,
"System...", null, 'S', null );
menuPropertyEditor = CreateMenuItem( menuProperty, ITEM_PLAIN,
"Editor...", null, 'E', null );
menuPropertyDisplay = CreateMenuItem( menuProperty, ITEM_PLAIN,
"Display...", null, 'D', null );
//Build the File-New sub-menu
menuFileNew = new JMenu ("New");
menuFileNew.setMnemonic ('N');
//Create File-New items
menuFileNewItem = CreateMenuItem( menuFileNew, ITEM_PLAIN,
"Item", null, 'A', null );
menuFileNewAccount = CreateMenuItem( menuFileNew, ITEM_PLAIN,
"Account", null, 'A', null );
// Create the file menu
menuFile = new JMenu( "File" );
menuFile.setMnemonic( 'F' );
menuBar.add( menuFile );
//Add the File-New menu
menuFile.add( menuFileNew );
// Create the file menu
// Build a file menu items
menuFileOpen = CreateMenuItem( menuFile, ITEM_PLAIN, "Open...",
new ImageIcon( "open.gif" ), 'O',
"Open a new file" );
menuFileSave = CreateMenuItem( menuFile, ITEM_PLAIN, "Save",
new ImageIcon( "save.gif" ), 'S',
" Save this file" );
menuFileSaveAs = CreateMenuItem( menuFile, ITEM_PLAIN,
"Save As...", null, 'A',
"Save this data to a new file" );
// Add the property menu
menuFile.addSeparator();
menuFile.add( menuProperty );
menuFile.addSeparator();
menuFileExit = CreateMenuItem( menuFile, ITEM_PLAIN,
"Exit", null, 'X',
"Exit the program" );
//menuFileExit.addActionListener(this);
// Create the file menu
menuEdit = new JMenu( "Edit" );
menuEdit.setMnemonic( 'E' );
menuBar.add( menuEdit );
// Create edit menu options
menuEditCut = CreateMenuItem( menuEdit, ITEM_PLAIN,
"Cut", null, 'T',
"Cut data to the clipboard" );
menuEditCopy = CreateMenuItem( menuEdit, ITEM_PLAIN,
"Copy", null, 'C',
"Copy data to the clipboard" );
menuEditPaste = CreateMenuItem( menuEdit, ITEM_PLAIN,
"Paste", null, 'P',
"Paste data from the clipboard" );
public JMenuItem CreateMenuItem( JMenu menu, int iType, String sText,
ImageIcon image, int acceleratorKey,
String sToolTip )
// Create the item
JMenuItem menuItem;
switch( iType )
case ITEM_RADIO:
menuItem = new JRadioButtonMenuItem();
break;
case ITEM_CHECK:
menuItem = new JCheckBoxMenuItem();
break;
default:
menuItem = new JMenuItem();
break;
// Add the item test
menuItem.setText( sText );
// Add the optional icon
if( image != null )
menuItem.setIcon( image );
// Add the accelerator key
if( acceleratorKey > 0 )
menuItem.setMnemonic( acceleratorKey );
// Add the optional tool tip text
if( sToolTip != null )
menuItem.setToolTipText( sToolTip );
// Add an action handler to this menu item
menuItem.addActionListener( this );
menu.add( menuItem );
return menuItem;
public void actionPerformed( ActionEvent event )
CardLayout cl = (CardLayout)(cards.getLayout());
if (event.getSource() == menuFileExit)
System.exit(0);
if (event.getSource() == menuFileNewAccount)
System.out.println ("hlkadflkajfalkdjfalksfj");
if (event.getSource() == menuFileNewItem){
if (firstRun){
newItemPanel.setVisible (true);
topPanel.setVisible (true);
cl.show(cards,RADIOPANEL);
firstRun = false;
//System.out.println( event );
private class ButtonListener implements ActionListener
public void actionPerformed(ActionEvent event)
CardLayout cl = (CardLayout)(cards.getLayout());
// cl.show(cards, (String)evt.getItem());
if (event.getSource() == continueButton){
if (!(onlineAuctionRadio.isSelected()) && !(fixedPriceRadio.isSelected()))
JOptionPane.showMessageDialog(null, "You must select at least one.", "Error", JOptionPane.ERROR_MESSAGE);
else{
if (onlineAuctionRadio.isSelected()){
cl.show (cards, DESCRIPTIONPANEL);
//newItemPanel.setVisible (false);
//newItemDescriptionPanel.setVisible (true);
if (event.getSource() == itemDescriptionContinueButton){
if (itemTitleTextField.getText().trim().equalsIgnoreCase(""))
JOptionPane.showMessageDialog(null, "You must enter a title.", "Error", JOptionPane.ERROR_MESSAGE);
else
cl.show (cards, PRICEENTERPANEL);
if (event.getSource() == backToRadioButton){
cl.show (cards, RADIOPANEL);
if (event.getSource() == backToItemDescriptionButton){
cl.show(cards, DESCRIPTIONPANEL);
if (standardPictureRadioButton.isSelected()){
superSizePicturesCheckBox.setEnabled (true);
if (picturePackRadioButton.isSelected()){
superSizePicturesCheckBox.setEnabled (false);
} //end of action performed
}Mostly I see there is about 100 times as much code as I care to look at.
So you don't know how to get a panel in a scroll pane, and then get that scroll pane into your GUI? Then try doing that by itself, not encumbered with 10000 lines of irrelevant code. Once you have it working, plug it into the big lump of code. Or if you can't get it working, ask about the small problem here. -
Hi
I'm having a rough time with getting the font I want using
DW8. I've built a little website www.carltongreen.com and the text
is just plain ugly in my estimation. I'm not understanding the
'css' panel whatsoever. No matter what I try ,I can't get a good
clean font. I'm looking for a font which is NOT bold--as a matter
of fact , I'm looking to to have a font very similar to the font in
this message, but everytime I try to decrease the font weight/size,
it always ends up looking BOLD and horrible. I'm frustrated beyond
belief. Can someone please help me get this problem sorted out?
Thanks
BobHere it is..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Carlton-Green Publishing</title>
<!-- TemplateEndEditable --><!--
TemplateBeginEditable name="head" --><!-- TemplateEndEditable
-->
<script language="JavaScript">
function doClock(){ // By Paul Davis - www.kaosweaver.com
var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";
var month=new Array('January','Jan', 'February','Feb',
'March','Mar', 'April','Apr', 'May','May', 'June','Jun',
'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct',
'November','Nov', 'December','Dec');
var tday= new Array('Sunday','Sun','Monday','Mon',
'Tuesday','Tue',
'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
for(i=0;i<a.length;i++) {a1=a
.charAt(1);switch (a.charAt(0)) {
case "M":if ((Number(a1)==3) &&
((t.getMonth()+1)<10)) str+="0";
str+=(Number(a1)>1)?t.getMonth()+1:month[t.getMonth()*2+Number(a1)];break;
case "D": if ((Number(a1)==1) &&
(t.getDate()<10)) str+="0";str+=t.getDate();break;
case "Y":
str+=(a1=='0')?t.getFullYear():t.getFullYear().toString().substring(2);break;
case "W":str+=tday[t.getDay()*2+Number(a1)];break; default:
str+=unescape(a
);}}return str;
</script>
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
.style2 {color: #FFFFFF}
-->
</style>
</head>
<body>
<div align="center">
<table width="720" border="0" bgcolor="#0166FF">
<tr class="style27">
<th class="style30" scope="col"><div align="right"
class="style29 style1">
<script language="JavaScript">
document.write(doClock("W0","%20","M0","%20","D1","%20","Y0"));
</script>
</div></th>
</tr>
<tr>
<td><div align="center">
<table width="720" border="0">
<tr>
<th colspan="4" align="center" valign="top"
bgcolor="#FFFFFF" scope="col"><p><img
src="../images/carltonGreen_logo.jpg" width="720" height="100"
/></p>
<table width="100%" border="0">
<tr>
<th colspan="6" scope="col"><table width="100%"
border="0">
<tr>
<th width="17%" scope="col"> </th>
<th width="69%" scope="col"><img
src="../images/title_banner.jpg" width="489" height="49"
/></th>
<th width="14%" scope="col"> </th>
</tr>
</table></th>
</tr>
<tr>
<td width="14%"> </td>
<td width="18%"><div align="center"><a
href="../index.html">Home</a></div></td>
<td width="18%"><div align="center"><a
href="../press.html">Press</a></div></td>
<td width="18%"><div align="center"><a
href="../contact.php">Contact</a></div></td>
<td width="17%"><div align="center"><a
href="../purchase.html">Purchase</a></div></td>
<td width="15%"> </td>
</tr>
<tr>
<td colspan="6"> </td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<th valign="top" scope="col"> <table width="100%"
border="0">
<!-- TemplateBeginEditable name="EditRegion3" -->
<tr>
<th width="3%" class="style34"
scope="col"> </th>
<th colspan="4" class="style23" scope="col"><div
align="center"><span class="style33"><span
class="style35"></span></span></div></th>
<th class="style23" scope="col"> </th>
</tr>
<tr>
<th class="style34" scope="col"> </th>
<th colspan="2" class="style34"
scope="col"> </th>
<th colspan="3" class="style34"
scope="col"> </th>
</tr>
<tr>
<th class="style34" scope="col"> </th>
<th width="2%" class="style34"
scope="col"> </th>
<th colspan="2" class="style26"
scope="col"> </th>
<th width="2%" class="style34"
scope="col"> </th>
<th width="3%" class="style34"
scope="col"> </th>
</tr>
<tr>
<th colspan="6" class="style34"
scope="col"> </th>
</tr>
<!-- TemplateEndEditable -->
</table>
<div align="left"><img
src="../images/buisseret_banner.jpg" width="500" height="124"
/><img src="../images/books.jpg" width="175" height="125"
/></div></th>
</tr>
</table> </th>
</tr>
</table>
</div></td>
</tr>
<tr class="style27">
<td><div align="center" class="style31 style1
style2">copyright 2006 <br />
Carlton-Green Publishing
Co Ltd </div></td>
</tr>
</table>
</div>
</body>
</html> -
Please help: can bullets look normal in JavaHelp?
When I generate JavaHelp (using RoboHelp) and preview, the bullets have prongs sticking out of them, instead of being smooth. Has anyone else encountered this? Is it a RoboHelp problem or a JavaHelp problem? Please help! I have to create compressed JavaHelp, and it's horribly ugly right now.
Thanks!I know of no way to make a 4:3 hi-def movie. Unless you just want to crop off the sides -- but then you'll just have a widescreen video with black bars on the sides!
-
Pixelated images in safari, please help.
Hi everyone,
Hoping someone can help me with a issue i have with my new macbook pro.
When browsing the net, safari and firefox show really pixelated images. I thought it might be my internet connection compressing data or something, but i have tried other computers on the same internet connection and the images show perfect...
So this makes me think its the macbook. I have upgraded snow leopard from 10.6 to 10.6.2 and updated safari, but unfortunately this didnt help my problem. So now i have ended up here, asking you people, coz im out of ideas.
I will include some screen shots so you can see exactly what i mean.
Notice the bad quality images and even on google's banner it is pixelated heaps...
Please help if you can. Its very annoying. Cheers.
screenshots
http://i134.photobucket.com/albums/q93/Bonustokin/randon/Screenshot2010-02-13at1 00814PM.png
http://i134.photobucket.com/albums/q93/Bonustokin/randon/Screenshot2010-02-13at1 00814PM.pngYes, I see the big ugly squares. They are what appears whenever extremely heavy JPEG compression is applied to a low-resolution image tht has relatively large areas of similar colors. Something somewhere is applying such compression to the pages, or portions of them, that you are viewing in your browser(s). Your MBP is not doing that: it can't. Either the page images (or parts of them) are being compressed by the website owners or, if every web page is affected, they are being compressed by your ISP in the process of being transmitted to you, as Gordito suggests. That would greatly increase the speed of page loading, but at the expense of image quality. You wouldn't see the image degradation on an iPhone or cell phone — the screen is too small — but on the MBP's high-resolution display it would be much more apparent, IF the MBP were receiving the signal in the same highly compressed form as the phone. If the MBP receives the same web pages through an ISP that doesn't over-compress them, they'll look the way they ought to look. So if you are receiving these web pages through a cellular ISP rather than through a broadband connection, take the MBP to a wifi hotspot and connect through wifi instead. I bet things will look different then.
Compressing images is something a web browser can't do: a browser just displays the signal that comes to it. -
I CANNOT restore my iPhone, so now I'm stuck with a useless iPhone because I can't complete Restore - because Error 23 keeps coming up! Ugh...it bugs the heck out of me, that Apple assigns an error number without explaining (a) what that IS, (b) taking or redirecting to a SPECIFIC troubleshoot page for THAT error. I've wasted lots of time doing all the stuff already suggested but Error 23 persists! Please help or I've just lost my lovely old-design 3G, which I really am loathe to give up for one of those ugly new boxy too-long slim things... (Which cost $200, 2 boot!)
Thx BUT =as-said, I've tried ALL the suggestions - including reading through the link you just suggested/posted (but just for good measure, i've just re-read thru it again!). I noticed from this list the first time i read thru it, that Error 23 didn't appear anywhere on this list of various (numerous!) error numbers. So/ergo, i still don't know (a) what exactly this error IS, (b) how to fix/get past/resolve it.
I don't have an Apple store anywhere near me. Even if I did, I wonder whether they would (a) be willing to (b) able to fix it @ the so-called Genius bar? Any thoughts on this? (Obviously, if there were an Apple store nearby, I'd go there & try; as-is, it would entail an extra trip & an expense costing as much as buying a new iPhone!) -
ListView please help me.
Hi all java gurus...
i'm working with an WYSIWYG editor and now i would like to implement HTML list (ordered & unordered) in such way that i can insert in my document....
Can someone tell me where can i find some code example to realize it??? or a snippet of code that implements this function??
i've read some posts on forum before i post this message but there is no helpful ......i've seen an implementation that use JList component but i want to see how ListView works before decide what use.
Please help me...any kind of idea is granted.
Tnx in advance.
regards,
anti-shockHi,
maybe you should use JTree to build HTML list.
http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html -
Pipelined function..please help
hi all...
i need a fuction which will split the data n insert into the table...
i created a fuction like this :
CREATE OR REPLACE FUNCTION FN_SPLIT(text IN VARCHAR2 DEFAULT NULL,delimiter IN VARCHAR2 DEFAULT ' ')
RETURN SPLIT_TYPE_TABLE PIPELINED
IS
PRAGMA AUTONOMOUS_TRANSACTION;
TYPE ref0 is REF CURSOR;
myCursor ref0;
out_rec SPLIT_TYPE := SPLIT_TYPE(null, null);
--CURSOR MSTFRC IS SELECT * FROM TEMP_SPLIT;
index_ NUMBER(10,0);
BEGIN
BEGIN
/*index_ := -1;
cnt:=0;
l_str:=text;
loop
l_n := instr( l_str, delimiter );
exit when (nvl(l_n,0) = 0);
cnt:=cnt+1;
INSERT INTO TEMP_SPLIT (ID,NAME)
VALUES (cnt,ltrim(rtrim(substr(l_str,1,l_n-1))));
l_str := substr( l_str, l_n+1 );
end loop;*/
Load_Temp_Splitting(text,delimiter);
open myCursor for select * from temp_split;
LOOP FETCH myCursor into out_rec.ID,out_rec.NAME;
EXIT WHEN myCursor%NOTFOUND;
PIPE ROW(out_rec);
END LOOP;
CLOSE myCursor;
RETURN;
END;
END FN_SPLIT;
it created succesfully without errors but when i run this function it showing an error like cannot evaluate pipelined function..
my requirement is to split the data like 'as,af,er,yt' split this by comma n insert into the table with row id like
1 as
2 af
3 er
like...
please help friends....
thnks in advance...
lol
Neethu> when i run this function it showing an error like cannot evaluate pipelined
function.
And that is one of the most important pieces of the puzzle - the actual error displayed. What is it? (full error, i.e. number + message)
As for the code in the function. That looks a bit like an ugly hack to me. Why the INSERT into table? Why not simply use a local collection or array?
And why a pipelined table function specifically?
The following code demonstrates a string split function:
SQL> create or replace type TStrings as table of varchar2(4000);
2 /
Type created.
SQL>
SQL> create or replace function tokenise( cString varchar2, cSeparator varchar2 DEFAULT ',' ) return TStrings AUTHID CURRENT_USER is
2 strList TStrings;
3 str varchar2(4000);
4 i integer;
5 l integer;
6
7 procedure AddString( cLine varchar2 ) is
8 begin
9 strList.Extend(1);
10 strList( strList.Count ) := cLine;
11 end;
12
13 begin
14 strList := new TStrings();
15
16 str := cString;
17 loop
18 l := LENGTH( str );
19 i := INSTR( str, cSeparator );
20
21 if i = 0 then
22 AddString( str );
23 else
24 AddString( SUBSTR( str, 1, i-1 ) );
25 str := SUBSTR( str, i+1 );
26 end if;
27
28 -- if the separator was on the last char of the line, there is
29 -- a trailing null column which we need to add manually
30 if i = l then
31 AddString( null );
32 end if;
33
34 exit when str is NULL;
35 exit when i = 0;
36 end loop;
37
38 return( strList );
39 end;
40 /
Function created.
SQL>
SQL> select tokenise( 'as,af,er,yt' ) from dual;
TOKENISE('AS,AF,ER,YT')
TSTRINGS('as', 'af', 'er', 'yt')
SQL>
SQL> select * from TABLE( tokenise( 'as,af,er,yt' ) );
COLUMN_VALUE
as
af
er
yt
SQL> -
I get it, I have to have Ads in skype. It's how it's kept free.
I've been able to just ignore the ads before because they were at the top or bottem left of my screen and weren't totally intrusive.
Well, tonight I updated my skype and was shocked ot see that now there is a HUGE panel on the right of my screen that shrinks the rest of my skype. And what is this panel for? A freaking ugly ad.
How can I go back to the smaller and less intrusive ads?
Better yet, is there a way to get rid of them all together?
Please help, I'm really upset at how the "update" really just made skype worse.
I added an image to help give a basic idea of what is going on.
Attachments:
ugly skype.jpg 603 KBI get it, I have to have Ads in skype. It's how it's kept free.
I've been able to just ignore the ads before because they were at the top or bottem left of my screen and weren't totally intrusive.
Well, tonight I updated my skype and was shocked ot see that now there is a HUGE panel on the right of my screen that shrinks the rest of my skype. And what is this panel for? A freaking ugly ad.
How can I go back to the smaller and less intrusive ads?
Better yet, is there a way to get rid of them all together?
Please help, I'm really upset at how the "update" really just made skype worse.
I added an image to help give a basic idea of what is going on.
Attachments:
ugly skype.jpg 603 KB
Maybe you are looking for
-
Deployed Composite not opening and throwing Error.
Hi,I have deployed a composite.Though it is visible in Application list.Upon clicking it I am getting the following Error.Can u suggest,how to avoid such scenarios. The composite OrderRespOAppProcessSrvc (1.0) is not available. This could happen beca
-
File links not working...help!
Hi, I'm trying to create some links to files such as, .doc, .pdf. ppt. etc. I've added them with the inspector and labeled them appropriately. However, nothing happens when I click on the links. Shouldn't Word open if the link is a .doc file? I've tr
-
Hi, I am trying to build a pie chart that will fire a custom function on rollover of the individual pie wedges. I need to be able to pass information about the wedge that is rolled over (i.e. a name or id) to this function. Thanks.
-
Quantity, Discount and Gift Box now showing
I have an issue that I am not sure can be fixed but will try here. I have uploaded my Muse site to business catalyst and have started setting up templates for the various E-Commerce that will be needed. SO far I have the catalog and product pages wo
-
Any examples that work with a PCI-6733?
I've been looking for a LabView example VI that has a very simple front panel for working with motors. I just got a PCI-6733 and haven't been able to find a real world example. Such as a motor starting, and doing something. If you know of one plz poi