Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by mes123

  1. mes123

    PHP egrep_replace

    I've made some progress I've made some progress... ereg_replace('([. ])cat([, ])', '\1mouse\2', $string); the two [ ] contain either a dot or comma and a space 1: "a cat box" gives "a mouse box" - OK 2: "a cat, box" -> "a cat, box" - STILL NOT RIGHT 3: "a x.cat box" -> "a x.mouse box" - OK 4...
  2. mes123

    PHP egrep_replace

    I'm trying to use egrep_replace to scan a series of string and replace certain words in certain contexts. However, regex isn't my strong point and I can't get it to work. If my the word I want to replace is 'cat' with 'mouse' but preserving some of the surrounding characters if they are...
  3. mes123

    Connecting to MySQL

    for part one of your question make a windows batch file and call it something like sql.bat in the put in the full mysql login command. Mine has this in it cd c:\mysql\bin mysql -u me -pmypassword make sure the dir where the batch file lives in in your path and you can then simple type sql...
  4. mes123

    complex sql query help.

    I have a db with the following tables: Products Products_to_categories Categories Accessories I am trying to make a query which will list all the products in a specific cateory and for each product list the model number of each accessory and the importance_level. The table setups are as...
  5. mes123

    printout scale differs depending of where app is executed from

    I have an application that uses the Graphics2D API and draws out an invoice. This is then printed on the local printer. When I run the application from within NetBeans the invoice prints full scale. When I execute the application from the command line the invoice prints out at 2/3 scale! I've...
  6. mes123

    Jar files in Jar files?

    Thanks Tim, found an entry and updating the Manifest solved the problem. Manifest-Version: 1.0 Class-Path: javamail/mail.jar jaf/jaf-1.0.2/activation.jar Created-By: NetBeans IDE Specified-By: JT.jarContent Main-Class: mPOS.mpos No to do some stress testing :)
  7. mes123

    Jar files in Jar files?

    I've just about finished coding my application and want to deploy it in a JAR file. The app using the javamail API which is supplied in a JAR file of it's own. At the moment I'm running my app from within the NetBeans IDE and I have the javaMail and Validation class JAR's mounted in the...
  8. mes123

    howto unselect a toggle button

    it's a difficult one. The toggle buttons form a login page on a POS system, a user selects their ID before proceeding, after the sale the login is displayed again and obviously it's better if all the buttons are deselected. I suppose I could replace them with normal jButtons and impletment the...
  9. mes123

    howto unselect a toggle button

    ah yes, you're right there. Well, I've implemented a bodge to get round the problem. I've created an extra button in the group and set it's size to 0 so it can't be seen. By setting this hidden button as selected it effectivly clears the rest. A horrible solution but it gets round the problem...
  10. mes123

    howto unselect a toggle button

    drat - how about unselecting a single one? I can mod the code easily so i know which button was selected.
  11. mes123

    howto unselect a toggle button

    I have a button group containing several toggle buttons. How do I unselect a button? I've tried togglebutton.setSelected(false) and togglebutton.doClick() but the button remains selected.
  12. mes123

    Can you email the contents of a Printable?

    there is no way to do it directly without having to save to a file first?
  13. mes123

    Can you email the contents of a Printable?

    I've got a JPanel that implements the Prinatble interface, it's used to display an invoice. I wanted to know if it's possible to send an email that will contain the 'image' of the jPanel. As far as I understand the JavaMail API you cannot simply set a Printable as the content of an email and I...
  14. mes123

    Can you email the contents of a Printable?

    I've got a printable Jpanel (and a printable class called printMe), is it possible to (easily) convert these and email them?
  15. mes123

    Printing jPanel prints the panel and the frame with a grey background

    the solutions were as follows: The grey background. Although the jpanel has its background set to white, the contentpane was still grey so getContentPane().setBackground(Color.white); solved the problem Fram printing over the jpanel: This was because my extended jPanel had a method...

Part and Inventory Search

Back
Top