Reputation: 0 Apprentice
- New Members
- Active Posts:
- 15 (0.03 per day)
- 20-August 12
- Profile Views:
- Last Active:
- Nov 08 2013 02:59 PM
- OS Preference:
- Favorite Browser:
- Internet Explorer
- Favorite Processor:
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 9 May 2013Use Strut instead of RigidArea
Simply put your actual eastBox in an horizontalBox with a horizontalStrut
add that combination to the EAST reason
Box withGap = Box.createHorizontalBox(); withGap.add(eastBox); withGap.add(Box.createHorizontalStrut(20)); add(withGap, BorderLayout.EAST);
Ok I never thought about putting multiple boxes inside one another. Very useful. Thanks!
Posted 6 Oct 2012I think I'm just going to go with the safe route and use what he's already taught us because he probably would assume I cheated if I used something we haven't covered yet. If he shows us a way that is more efficient than the one I came up with that doesn't deal with arrays, I will post it here in a few days so you guys can see.
Posted 6 Oct 2012In the class that I'm in we haven't gone over arrays yet, so I probably won't use them. I probably should have mentioned the concepts we've gone over so far sorry about that. Data types, If statements, loops, and methods are really all we have covered so far which makes it way more restrictive! Thanks for both of your replies though. I will definitely be able to use that advice in the future.
Posted 16 Sep 2012You will need to use a printf() using
- %Xs where X is rge largest String
- %X.Yf where X is the total float length and Y the number of decimal required
is you have int to print you will need %Xd aligning it with the X - Y ote previous
I see what you mean, I never thought of it that way.
Posted 22 Aug 2012Perhaps you could look into creating a single XML file to store all settings in? Reading XML via XMLReader is actually really easy, especially if everything is done in a symmetrical sort of manner. Then both EXEs can access the file, and read from different locations, i.e:
<settings> <admin> <username data="The cool admin"/> </admin> <user> <username data="The chilled out user"/> </user> </settings>
You should be able to change the following code snippet from a CodeProject tutorial to suit your needs:
(FYI: This is for a console application)
Imports System.IO Imports System.Xml Module ParsingUsingXmlDocument Sub Main() Try Dim m_xmld As XmlDocument Dim m_nodelist As XmlNodeList Dim m_node As XmlNode 'Create the XML Document m_xmld = New XmlDocument() 'Load the Xml file m_xmld.Load("C:\CMS\Personal\family.xml") 'Get the list of name nodes m_nodelist = m_xmld.SelectNodes("/family/name") 'Loop through the nodes For Each m_node In m_nodelist 'Get the Gender Attribute Value Dim genderAttribute = m_node.Attributes.GetNamedItem("gender").Value 'Get the firstName Element Value Dim firstNameValue = m_node.ChildNodes.Item(0).InnerText 'Get the lastName Element Value Dim lastNameValue = m_node.ChildNodes.Item(1).InnerText 'Write Result to the Console Console.Write("Gender: " & genderAttribute _ & " FirstName: " & firstNameValue & " LastName: " _ & lastNameValue) Console.Write(vbCrLf) Next Catch errorVariable As Exception 'Error trapping Console.Write(errorVariable.ToString()) End Try End Sub End Module
The attributes and values of tags can be accessed via:
Dim username = node.Attributes.GetNamedItem("username").Attributes("data").Value
Value (Text between tags: <tag>Text</tag>)
Dim username = node.Attributes.GetNamedItem("username").InnerText ' Bearing in mind the tag would now be: ' <username>The chilled out admin</username>
Thanks for the suggestion. Looks like it could be a reliable solution. I will try this out. Thanks Again!
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Years Programming:
bcsmith8 hasn't added any friends yet.